json_filter/tree/consts.go

74 lines
1.7 KiB
Go
Raw Normal View History

2023-03-28 18:39:05 +08:00
// 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 = ":"
2023-03-30 12:26:17 +08:00
// KeywordComma 逗号
KeywordComma = ","
2023-03-29 14:40:59 +08:00
// KeywordDot .
KeywordDot = "."
2023-03-28 18:39:05 +08:00
// KeywordDoubleQuote 双引号
KeywordDoubleQuote = `"`
// KeywordEscapeSymbol 转义符号
KeywordEscapeSymbol = `\`
2023-03-29 14:40:59 +08:00
// 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"
2023-03-28 18:39:05 +08:00
)
2023-03-28 18:42:06 +08:00
const (
// ValueTypeString 字符串类型
ValueTypeString = "string"
2023-03-28 23:56:13 +08:00
// ValueTypeBool bool类型
ValueTypeBool = "bool"
2023-03-28 18:42:06 +08:00
// ValueTypeInteger int类型
ValueTypeInteger = "int64"
// ValueTypeFloat float类型
ValueTypeFloat = "float64"
2023-03-29 14:40:59 +08:00
// ValueTypeNumber 数字
ValueTypeNumber = "number"
2023-03-28 18:42:06 +08:00
// ValueTypeMap map数据
ValueTypeMap = "map"
// ValueTypeArray 数组
ValueTypeArray = "array"
)
2023-03-28 23:56:13 +08:00
// isBaseDataType 是否为基础数据类型
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 23:16 2023/3/28
func isBaseDataType(valueType string) bool {
return valueType != ValueTypeArray && valueType != ValueTypeMap
}