74 lines
1.7 KiB
Go
74 lines
1.7 KiB
Go
// 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 = ":"
|
|
// KeywordComma 逗号
|
|
KeywordComma = ","
|
|
// KeywordDot .
|
|
KeywordDot = "."
|
|
// KeywordDoubleQuote 双引号
|
|
KeywordDoubleQuote = `"`
|
|
// KeywordEscapeSymbol 转义符号
|
|
KeywordEscapeSymbol = `\`
|
|
// KeywordSpace 空格
|
|
KeywordSpace = " "
|
|
// KeywordMinus 负号
|
|
KeywordMinus = "-"
|
|
// KeywordTrueStart true的起始值
|
|
KeywordTrueStart = "t"
|
|
// KeywordFalseStart false的起始值
|
|
KeywordFalseStart = "f"
|
|
KeywordZero = "0"
|
|
KeywordOne = "1"
|
|
KeywordTwo = "2"
|
|
KeywordThree = "3"
|
|
KeywordFour = "4"
|
|
KeywordFive = "5"
|
|
KeywordSix = "6"
|
|
KeywordSeven = "7"
|
|
KeywordEight = "8"
|
|
KeywordNine = "9"
|
|
)
|
|
|
|
const (
|
|
// ValueTypeString 字符串类型
|
|
ValueTypeString = "string"
|
|
// ValueTypeBool bool类型
|
|
ValueTypeBool = "bool"
|
|
// ValueTypeInteger int类型
|
|
ValueTypeInteger = "int64"
|
|
// ValueTypeFloat float类型
|
|
ValueTypeFloat = "float64"
|
|
// ValueTypeNumber 数字
|
|
ValueTypeNumber = "number"
|
|
// ValueTypeMap map数据
|
|
ValueTypeMap = "map"
|
|
// ValueTypeArray 数组
|
|
ValueTypeArray = "array"
|
|
)
|
|
|
|
// isBaseDataType 是否为基础数据类型
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 23:16 2023/3/28
|
|
func isBaseDataType(valueType string) bool {
|
|
return valueType != ValueTypeArray && valueType != ValueTypeMap
|
|
}
|