优化自动生成json #3
25
tree/consts.go
Normal file
25
tree/consts.go
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
// Package tree ...
|
||||||
|
//
|
||||||
|
// Description : tree ...
|
||||||
|
//
|
||||||
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
//
|
||||||
|
// Date : 2023-03-28 18:32
|
||||||
|
package tree
|
||||||
|
|
||||||
|
const (
|
||||||
|
// KeywordObjectStart 对象开始标识
|
||||||
|
KeywordObjectStart = "{"
|
||||||
|
// KeywordObjectEnd 对象结束标识
|
||||||
|
KeywordObjectEnd = "}"
|
||||||
|
// KeywordArrayStart 数组开始标识
|
||||||
|
KeywordArrayStart = "["
|
||||||
|
// KeywordArrayEnd 数组结束标识
|
||||||
|
KeywordArrayEnd = "]"
|
||||||
|
// KeywordColon 冒号
|
||||||
|
KeywordColon = ":"
|
||||||
|
// KeywordDoubleQuote 双引号
|
||||||
|
KeywordDoubleQuote = `"`
|
||||||
|
// KeywordEscapeSymbol 转义符号
|
||||||
|
KeywordEscapeSymbol = `\`
|
||||||
|
)
|
||||||
@@ -15,7 +15,7 @@ package tree
|
|||||||
type Node struct {
|
type Node struct {
|
||||||
IsVirtual bool // 是否虚拟节点, 主要应对输入的原始数据为list这一场景
|
IsVirtual bool // 是否虚拟节点, 主要应对输入的原始数据为list这一场景
|
||||||
Value interface{} // 节点的值
|
Value interface{} // 节点的值
|
||||||
ValueType string // 数据类型 int64 / float64 / map / list / nil
|
ValueType string // 数据类型 string / int64 / float64 / map / list / nil
|
||||||
Key string // 节点的key名称(输入的原始名称)
|
Key string // 节点的key名称(输入的原始名称)
|
||||||
Show bool // 节点是否可见
|
Show bool // 节点是否可见
|
||||||
ShowKey string // 重新序列化后, 对外输出的Key
|
ShowKey string // 重新序列化后, 对外输出的Key
|
||||||
|
|||||||
Reference in New Issue
Block a user