修复生成的json数据结构错误问题
This commit is contained in:
@ -199,8 +199,14 @@ func (dj *DynamicJSON) getValFormat(root *JSONode) string {
|
||||
}
|
||||
|
||||
if root.IsHasLastBrother {
|
||||
if root.IsString {
|
||||
return key + ":\"%v\","
|
||||
}
|
||||
return key + ":%v,"
|
||||
}
|
||||
if root.IsString {
|
||||
return key + ":\"%v\""
|
||||
}
|
||||
return key + ":%v"
|
||||
}
|
||||
|
||||
@ -209,10 +215,15 @@ func (dj *DynamicJSON) getValFormat(root *JSONode) string {
|
||||
return ""
|
||||
}
|
||||
if root.IsHasLastBrother {
|
||||
if root.IsString {
|
||||
return "\"%v\","
|
||||
}
|
||||
return "%v,"
|
||||
}
|
||||
if root.IsString {
|
||||
return "\"%v\""
|
||||
}
|
||||
return "%v"
|
||||
|
||||
}
|
||||
|
||||
// getStartSymbol 计算起始的符号
|
||||
|
Reference in New Issue
Block a user