优化自动生成json #3

Merged
zhangdeman merged 24 commits from feature/tree into master 2023-05-05 16:10:39 +08:00
718344dcc1 value解析支持转义符
白茶清欢
2023-03-30 14:13:09 +08:00
Commit 13 of 24
Show all commits
+9
View File
@@ -268,6 +268,15 @@ func (g *Generate) getValue(startIndex int) (string, int, error) {
}
}
isStart = true
if str == KeywordEscapeSymbol {
// 转义符
startIndex++
if startIndex >= len(g.jsonDataByte) {
// 转义符后面没东西了
return "", startIndex, errors.New("escape symbol without any data")
}
str = string(g.jsonDataByte[startIndex])
}
valArr = append(valArr, str)
startIndex++
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.