Documentation
¶
Index ¶
- func StringTrim(str string) string
- type JSONNumber
- type JSONString
- type JsonArray
- func (a *JsonArray) A(idx int) *JsonArray
- func (a *JsonArray) Add(v interface{}) int
- func (a *JsonArray) AddArray(v *JsonArray) int
- func (a *JsonArray) AddBool(v bool) int
- func (a *JsonArray) AddDouble(v float64) int
- func (a *JsonArray) AddFloat(v float32) int
- func (a *JsonArray) AddInt(v int) int
- func (a *JsonArray) AddInt32(v int32) int
- func (a *JsonArray) AddInt64(v int64) int
- func (a *JsonArray) AddNull() int
- func (a *JsonArray) AddObject(v *JsonObject) int
- func (a *JsonArray) AddString(v string) int
- func (a *JsonArray) AsJson() (str string)
- func (a *JsonArray) AsString() (str string)
- func (a *JsonArray) B(idx int) interface{}
- func (a *JsonArray) D(idx int) float64
- func (a *JsonArray) F(idx int) float32
- func (a *JsonArray) GetArray(idx int) *JsonArray
- func (a *JsonArray) GetBool(idx int) bool
- func (a *JsonArray) GetDouble(idx int) float64
- func (a *JsonArray) GetFloat(idx int) float32
- func (a *JsonArray) GetInt(idx int) int
- func (a *JsonArray) GetInt32(idx int) int32
- func (a *JsonArray) GetInt64(idx int) int64
- func (a *JsonArray) GetObject(idx int) *JsonObject
- func (a *JsonArray) GetString(idx int) string
- func (a *JsonArray) I(idx int) int
- func (a *JsonArray) I32(idx int) int32
- func (a *JsonArray) I64(idx int) int64
- func (a *JsonArray) O(idx int) *JsonObject
- func (a *JsonArray) Remove(idx int) bool
- func (a *JsonArray) S(idx int) string
- func (a *JsonArray) SetArray(idx int, arr *JsonArray)
- func (a *JsonArray) SetBool(idx int, b bool)
- func (a *JsonArray) SetDouble(idx int, f64 float64)
- func (a *JsonArray) SetFloat(idx int, f32 float32)
- func (a *JsonArray) SetInt(idx int, i int)
- func (a *JsonArray) SetInt32(idx int, i32 int32)
- func (a *JsonArray) SetInt64(idx int, i64 int64)
- func (a *JsonArray) SetNull(idx int)
- func (a *JsonArray) SetObject(idx int, obj *JsonObject)
- func (a *JsonArray) SetString(idx int, s string)
- func (a *JsonArray) Val(idx int) (val *JsonValue)
- func (a *JsonArray) Values() []*JsonValue
- type JsonElement
- type JsonNode
- type JsonObject
- func (O *JsonObject) AsJson() (str string)
- func (O *JsonObject) AsString() (str string)
- func (O *JsonObject) Contains(k string) bool
- func (O *JsonObject) GetArray(k string) *JsonArray
- func (O *JsonObject) GetBool(k string) bool
- func (O *JsonObject) GetDouble(k string) float64
- func (O *JsonObject) GetFloat(k string) float32
- func (O *JsonObject) GetInt(k string) int
- func (O *JsonObject) GetInt32(k string) int32
- func (O *JsonObject) GetInt64(k string) int64
- func (O *JsonObject) GetNames() (arr *JsonArray)
- func (O *JsonObject) GetObject(k string) *JsonObject
- func (O *JsonObject) GetString(k string) string
- func (O *JsonObject) GetValues() (arr *JsonArray)
- func (O *JsonObject) Has(k string) bool
- func (O *JsonObject) KeyAsArray(k string) *JsonArray
- func (O *JsonObject) KeyAsDouble(k string) float64
- func (O *JsonObject) KeyAsFloat(k string) float32
- func (O *JsonObject) KeyAsInt(k string) int
- func (O *JsonObject) KeyAsInt32(k string) int32
- func (O *JsonObject) KeyAsInt64(k string) int64
- func (O *JsonObject) KeyAsObject(k string) *JsonObject
- func (O *JsonObject) KeyAsString(k string) string
- func (O *JsonObject) Remove(k string) bool
- func (O *JsonObject) Set(k string, v interface{})
- func (O *JsonObject) SetArray(k string, v *JsonArray)
- func (O *JsonObject) SetBool(k string, v bool)
- func (O *JsonObject) SetDouble(k string, v float64)
- func (O *JsonObject) SetFloat(k string, v float32)
- func (O *JsonObject) SetInt(k string, v int)
- func (O *JsonObject) SetInt32(k string, v int32)
- func (O *JsonObject) SetInt64(k string, v int64)
- func (O *JsonObject) SetNull(k string)
- func (O *JsonObject) SetObject(k string, v *JsonObject)
- func (O *JsonObject) SetString(k, v string)
- func (O *JsonObject) Val(k string) (val *JsonValue)
- func (O *JsonObject) ValErr(k string) (val *JsonValue, err error)
- type JsonTokenizer
- type JsonValue
- func (v *JsonValue) AsArray() (arr *JsonArray, err error)
- func (v *JsonValue) AsBool() (bool, error)
- func (v *JsonValue) AsBoolDef(def bool) bool
- func (v *JsonValue) AsDouble() (float64, error)
- func (v *JsonValue) AsDoubleDef(def float64) (val float64)
- func (v *JsonValue) AsFloat32() (val float32, err error)
- func (v *JsonValue) AsFloat32Def(def float32) (val float32)
- func (v *JsonValue) AsFloat64() (val float64, err error)
- func (v *JsonValue) AsFloat64Def(def float64) (val float64)
- func (v *JsonValue) AsInt() (int, error)
- func (v *JsonValue) AsInt32() (int32, error)
- func (v *JsonValue) AsInt32Def(def int32) (val int32)
- func (v *JsonValue) AsInt64() (val int64, err error)
- func (v *JsonValue) AsInt64Def(def int64) (val int64)
- func (v *JsonValue) AsIntDef(def int) (val int)
- func (v *JsonValue) AsObject() (obj *JsonObject, err error)
- func (v *JsonValue) AsString() (str string, err error)
- func (v *JsonValue) AsStringDef(def string) (val string)
- func (v *JsonValue) IsArray() bool
- func (v *JsonValue) IsBool() bool
- func (v *JsonValue) IsFalse() bool
- func (v *JsonValue) IsNull() bool
- func (v *JsonValue) IsNumber() bool
- func (v *JsonValue) IsObject() bool
- func (v *JsonValue) IsString() bool
- func (v *JsonValue) IsTrue() bool
- type ValType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringTrim ¶
Types ¶
type JSONNumber ¶
type JSONNumber struct {
// contains filtered or unexported fields
}
type JSONString ¶
type JSONString []rune
type JsonArray ¶
type JsonArray struct {
// contains filtered or unexported fields
}
func ParseArray ¶
func (*JsonArray) AddObject ¶
func (a *JsonArray) AddObject(v *JsonObject) int
func (*JsonArray) GetObject ¶
func (a *JsonArray) GetObject(idx int) *JsonObject
func (*JsonArray) O ¶
func (a *JsonArray) O(idx int) *JsonObject
func (*JsonArray) SetObject ¶
func (a *JsonArray) SetObject(idx int, obj *JsonObject)
type JsonElement ¶
type JsonElement struct {
// contains filtered or unexported fields
}
type JsonNode ¶
type JsonNode struct {
// contains filtered or unexported fields
}
func LoadFromFile ¶
func New ¶
New JSONNode //////////////////////////////////////////////////////////////////////////////////////////////////
func (*JsonNode) AsObject ¶
func (this *JsonNode) AsObject() *JsonObject
type JsonObject ¶
type JsonObject struct {
// contains filtered or unexported fields
}
func NewObject ¶
func NewObject() (obj *JsonObject)
NewObject JsonObject //////////////////////////////////////////////////////////////////////////////////////////////////
func ParseObject ¶
func ParseObject(s string) (obj *JsonObject)
func (*JsonObject) AsJson ¶
func (O *JsonObject) AsJson() (str string)
func (*JsonObject) AsString ¶
func (O *JsonObject) AsString() (str string)
func (*JsonObject) Contains ¶
func (O *JsonObject) Contains(k string) bool
func (*JsonObject) GetArray ¶
func (O *JsonObject) GetArray(k string) *JsonArray
func (*JsonObject) GetBool ¶
func (O *JsonObject) GetBool(k string) bool
func (*JsonObject) GetDouble ¶
func (O *JsonObject) GetDouble(k string) float64
func (*JsonObject) GetFloat ¶
func (O *JsonObject) GetFloat(k string) float32
func (*JsonObject) GetInt ¶
func (O *JsonObject) GetInt(k string) int
func (*JsonObject) GetInt32 ¶
func (O *JsonObject) GetInt32(k string) int32
func (*JsonObject) GetInt64 ¶
func (O *JsonObject) GetInt64(k string) int64
func (*JsonObject) GetNames ¶
func (O *JsonObject) GetNames() (arr *JsonArray)
func (*JsonObject) GetObject ¶
func (O *JsonObject) GetObject(k string) *JsonObject
func (*JsonObject) GetString ¶
func (O *JsonObject) GetString(k string) string
func (*JsonObject) GetValues ¶
func (O *JsonObject) GetValues() (arr *JsonArray)
func (*JsonObject) Has ¶
func (O *JsonObject) Has(k string) bool
func (*JsonObject) KeyAsArray ¶
func (O *JsonObject) KeyAsArray(k string) *JsonArray
func (*JsonObject) KeyAsDouble ¶
func (O *JsonObject) KeyAsDouble(k string) float64
func (*JsonObject) KeyAsFloat ¶
func (O *JsonObject) KeyAsFloat(k string) float32
func (*JsonObject) KeyAsInt ¶
func (O *JsonObject) KeyAsInt(k string) int
func (*JsonObject) KeyAsInt32 ¶
func (O *JsonObject) KeyAsInt32(k string) int32
func (*JsonObject) KeyAsInt64 ¶
func (O *JsonObject) KeyAsInt64(k string) int64
func (*JsonObject) KeyAsObject ¶
func (O *JsonObject) KeyAsObject(k string) *JsonObject
func (*JsonObject) KeyAsString ¶
func (O *JsonObject) KeyAsString(k string) string
func (*JsonObject) Remove ¶
func (O *JsonObject) Remove(k string) bool
func (*JsonObject) Set ¶
func (O *JsonObject) Set(k string, v interface{})
func (*JsonObject) SetArray ¶
func (O *JsonObject) SetArray(k string, v *JsonArray)
func (*JsonObject) SetBool ¶
func (O *JsonObject) SetBool(k string, v bool)
func (*JsonObject) SetDouble ¶
func (O *JsonObject) SetDouble(k string, v float64)
func (*JsonObject) SetFloat ¶
func (O *JsonObject) SetFloat(k string, v float32)
func (*JsonObject) SetInt ¶
func (O *JsonObject) SetInt(k string, v int)
func (*JsonObject) SetInt32 ¶
func (O *JsonObject) SetInt32(k string, v int32)
func (*JsonObject) SetInt64 ¶
func (O *JsonObject) SetInt64(k string, v int64)
func (*JsonObject) SetNull ¶
func (O *JsonObject) SetNull(k string)
func (*JsonObject) SetObject ¶
func (O *JsonObject) SetObject(k string, v *JsonObject)
func (*JsonObject) SetString ¶
func (O *JsonObject) SetString(k, v string)
func (*JsonObject) Val ¶
func (O *JsonObject) Val(k string) (val *JsonValue)
type JsonTokenizer ¶
type JsonTokenizer struct {
// contains filtered or unexported fields
}
type JsonValue ¶
type JsonValue struct {
// contains filtered or unexported fields
}
func (*JsonValue) AsDoubleDef ¶
func (*JsonValue) AsFloat32Def ¶
func (*JsonValue) AsFloat64Def ¶
func (*JsonValue) AsInt32Def ¶
func (*JsonValue) AsInt64Def ¶
func (*JsonValue) AsObject ¶
func (v *JsonValue) AsObject() (obj *JsonObject, err error)
func (*JsonValue) AsStringDef ¶
Click to show internal directories.
Click to hide internal directories.