优化自动生成json #3
@@ -268,6 +268,15 @@ func (g *Generate) getValue(startIndex int) (string, int, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
isStart = true
|
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)
|
valArr = append(valArr, str)
|
||||||
startIndex++
|
startIndex++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user