1 package ldvalue 2 3 // string literals should be defined here if they are referenced in multiple files 4 5 const ( 6 trueString = "true" 7 falseString = "false" 8 nullAsJSON = "null" 9 noneDescription = "[none]" 10 ) 11 12 var ( 13 nullAsJSONBytes = []byte("null") //nolint:gochecknoglobals 14 trueBytes = []byte("true") //nolint:gochecknoglobals 15 falseBytes = []byte("false") //nolint:gochecknoglobals 16 ) 17 18 // ValueType is defined in value_base.go 19 20 const ( 21 // NullType describes a null value. Note that the zero value of ValueType is NullType, so the 22 // zero of Value is a null value. See [Null]. 23 NullType ValueType = iota 24 // BoolType describes a boolean value. See [Bool]. 25 BoolType ValueType = iota 26 // NumberType describes a numeric value. JSON does not have separate types for int and float, but 27 // you can convert to either. See [Int] and [Float64]. 28 NumberType ValueType = iota 29 // StringType describes a string value. See [String]. 30 StringType ValueType = iota 31 // ArrayType describes an array value. See [ArrayOf] and [ArrayBuild]. 32 ArrayType ValueType = iota 33 // ObjectType describes an object (a.k.a. map). See [ObjectBuild]. 34 ObjectType ValueType = iota 35 // RawType describes a json.RawMessage value. See [Raw]. 36 RawType ValueType = iota 37 ) 38