Versions in this module Expand all Collapse all v1 v1.0.0 Dec 29, 2023 Changes in this version + const ErrArrayLengthMismatch + const ErrInterfaceUnsupported + const ErrInvalidChar + const ErrInvalidHex + const ErrInvalidJsonArray + const ErrInvalidJsonBoolean + const ErrInvalidJsonDict + const ErrInvalidJsonFloat + const ErrInvalidJsonInt + const ErrInvalidJsonString + const ErrInvalidRune + const ErrJsonDictFailInsert + const ErrJsonDictKeyNotFound + const ErrMapKeyMustString + const ErrMissingInputField + const ErrNilInputField + const ErrOutOfIndexRange + const ErrOutOfKeyRange + const ErrTypeMismatch + const ErrUnsupported + const ErrYamlIllFormat + const ErrYamlMissingDictKey + const TAG_DEPRECATED_BY + var JSONArrayPtrType reflect.Type + var JSONArrayType reflect.Type + var JSONBoolPtrType reflect.Type + var JSONBoolType reflect.Type + var JSONDictPtrType reflect.Type + var JSONDictType reflect.Type + var JSONFalse = &JSONBool + var JSONFloatPtrType reflect.Type + var JSONFloatType reflect.Type + var JSONIntPtrType reflect.Type + var JSONIntType reflect.Type + var JSONNull = &JSONValue + var JSONObjectType reflect.Type + var JSONStringPtrType reflect.Type + var JSONStringType reflect.Type + var JSONTrue = &JSONBool + func CheckRequiredFields(data JSONObject, fields []string) error + func GetAnyString(json JSONObject, keys []string) string + func GetAnyString2(json JSONObject, keys []string) (string, string) + func GetQueryStringArray(query JSONObject, key string) []string + func GetStringArray(o JSONObject, key ...string) ([]string, error) + func IsImplementStdMarshaler(v reflect.Value) json.Marshaler + func IsImplementStdUnmarshaler(v reflect.Value) json.Unmarshaler + func JSONArray2StringArray(arr []JSONObject) []string + func JSONDeserialize(objType reflect.Type, strVal string) (gotypes.ISerializable, error) + func QueryBoolean(query JSONObject, key string, defVal bool) bool + func Update(dst, src interface{}) error + type JSONArray struct + func NewArray(objs ...JSONObject) *JSONArray + func NewStringArray(arr []string) *JSONArray + func (arr *JSONArray) Equals(json JSONObject) bool + func (self *JSONArray) Interface() interface{} + func (this *JSONArray) Add(objs ...JSONObject) + func (this *JSONArray) Copy() *JSONArray + func (this *JSONArray) DeepCopy() interface{} + func (this *JSONArray) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONArray) GetAt(i int, keys ...string) (JSONObject, error) + func (this *JSONArray) GetString(keys ...string) (string, error) + func (this *JSONArray) GetStringArray() []string + func (this *JSONArray) IsZero() bool + func (this *JSONArray) Length() int + func (this *JSONArray) PrettyString() string + func (this *JSONArray) SetAt(idx int, obj JSONObject) + func (this *JSONArray) Size() int + func (this *JSONArray) String() string + func (this *JSONArray) Unmarshal(obj interface{}, keys ...string) error + func (this *JSONArray) Value() []JSONObject + func (this *JSONArray) YAMLString() string + type JSONBool struct + func NewBool(val bool) *JSONBool + func (o *JSONBool) Equals(json JSONObject) bool + func (self *JSONBool) Interface() interface{} + func (this *JSONBool) Bool(keys ...string) (bool, error) + func (this *JSONBool) DeepCopy() interface{} + func (this *JSONBool) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONBool) GetString(keys ...string) (string, error) + func (this *JSONBool) IsZero() bool + func (this *JSONBool) PrettyString() string + func (this *JSONBool) String() string + func (this *JSONBool) Value() bool + func (this *JSONBool) YAMLString() string + type JSONDict struct + func Diff(a, b *JSONDict) (aNoB, aDiffB, aAndB, bNoA *JSONDict) + func NewDict(objs ...JSONPair) *JSONDict + func (dict *JSONDict) Equals(json JSONObject) bool + func (dict *JSONDict) Update(json JSONObject) + func (dict *JSONDict) UpdateDefault(json JSONObject) + func (self *JSONDict) Interface() interface{} + func (this *JSONDict) Add(o JSONObject, keys ...string) error + func (this *JSONDict) Bool(keys ...string) (bool, error) + func (this *JSONDict) Contains(keys ...string) bool + func (this *JSONDict) ContainsIgnoreCases(keys ...string) bool + func (this *JSONDict) Copy(excludes ...string) *JSONDict + func (this *JSONDict) CopyExcludes(excludes ...string) *JSONDict + func (this *JSONDict) CopyIncludes(includes ...string) *JSONDict + func (this *JSONDict) DeepCopy() interface{} + func (this *JSONDict) Float(keys ...string) (float64, error) + func (this *JSONDict) Get(keys ...string) (JSONObject, error) + func (this *JSONDict) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONDict) GetAt(i int, keys ...string) (JSONObject, error) + func (this *JSONDict) GetIgnoreCases(keys ...string) (JSONObject, error) + func (this *JSONDict) GetMap(keys ...string) (map[string]JSONObject, error) + func (this *JSONDict) GetString(keys ...string) (string, error) + func (this *JSONDict) GetTime(keys ...string) (time.Time, error) + func (this *JSONDict) Int(keys ...string) (int64, error) + func (this *JSONDict) IsZero() bool + func (this *JSONDict) Length() int + func (this *JSONDict) PrettyString() string + func (this *JSONDict) QueryString() string + func (this *JSONDict) Remove(key string) bool + func (this *JSONDict) RemoveIgnoreCase(key string) bool + func (this *JSONDict) Set(key string, value JSONObject) + func (this *JSONDict) Size() int + func (this *JSONDict) SortedKeys() []string + func (this *JSONDict) String() string + func (this *JSONDict) Unmarshal(obj interface{}, keys ...string) error + func (this *JSONDict) Value() map[string]JSONObject + func (this *JSONDict) YAMLString() string + type JSONError struct + func NewJSONError(str []byte, pos int, msg string) *JSONError + func (e *JSONError) Error() string + type JSONFloat struct + func NewFloat(val float64) *JSONFloat + func NewFloat32(val float32) *JSONFloat + func NewFloat64(val float64) *JSONFloat + func (o *JSONFloat) Equals(json JSONObject) bool + func (self *JSONFloat) Interface() interface{} + func (this *JSONFloat) DeepCopy() interface{} + func (this *JSONFloat) Float(keys ...string) (float64, error) + func (this *JSONFloat) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONFloat) GetString(keys ...string) (string, error) + func (this *JSONFloat) IsZero() bool + func (this *JSONFloat) PrettyString() string + func (this *JSONFloat) String() string + func (this *JSONFloat) Value() float64 + func (this *JSONFloat) YAMLString() string + type JSONInt struct + func NewInt(val int64) *JSONInt + func (o *JSONInt) Equals(json JSONObject) bool + func (self *JSONInt) Interface() interface{} + func (this *JSONInt) DeepCopy() interface{} + func (this *JSONInt) Float(keys ...string) (float64, error) + func (this *JSONInt) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONInt) GetString(keys ...string) (string, error) + func (this *JSONInt) Int(keys ...string) (int64, error) + func (this *JSONInt) IsZero() bool + func (this *JSONInt) PrettyString() string + func (this *JSONInt) String() string + func (this *JSONInt) Value() int64 + func (this *JSONInt) YAMLString() string + type JSONObject interface + Bool func(keys ...string) (bool, error) + Contains func(keys ...string) bool + ContainsIgnoreCases func(keys ...string) bool + Equals func(obj JSONObject) bool + Float func(keys ...string) (float64, error) + Get func(keys ...string) (JSONObject, error) + GetArray func(keys ...string) ([]JSONObject, error) + GetAt func(i int, keys ...string) (JSONObject, error) + GetIgnoreCases func(keys ...string) (JSONObject, error) + GetMap func(keys ...string) (map[string]JSONObject, error) + GetString func(keys ...string) (string, error) + GetTime func(keys ...string) (time.Time, error) + Int func(keys ...string) (int64, error) + Interface func() interface{} + PrettyString func() string + QueryString func() string + Unmarshal func(obj interface{}, keys ...string) error + YAMLString func() string + func DeepCopy(obj JSONObject) JSONObject + func GetArrayOfPrefix(json JSONObject, prefix string) []JSONObject + func Marshal(obj interface{}) JSONObject + func MarshalAll(obj interface{}) JSONObject + func Parse(str []byte) (JSONObject, error) + func ParseQueryString(str string) (JSONObject, error) + func ParseString(str string) (JSONObject, error) + func ParseYAML(str string) (JSONObject, error) + type JSONPair struct + type JSONString struct + func NewString(val string) *JSONString + func NewTimeString(tm time.Time) *JSONString + func (o *JSONString) Equals(json JSONObject) bool + func (self *JSONString) Interface() interface{} + func (this *JSONString) Bool(keys ...string) (bool, error) + func (this *JSONString) DeepCopy() interface{} + func (this *JSONString) Float(keys ...string) (float64, error) + func (this *JSONString) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONString) GetString(keys ...string) (string, error) + func (this *JSONString) GetTime(keys ...string) (time.Time, error) + func (this *JSONString) Int(keys ...string) (int64, error) + func (this *JSONString) IsZero() bool + func (this *JSONString) Length() int + func (this *JSONString) PrettyString() string + func (this *JSONString) String() string + func (this *JSONString) Unmarshal(obj interface{}, keys ...string) error + func (this *JSONString) Value() string + func (this *JSONString) YAMLString() string + type JSONValue struct + func (o *JSONValue) Equals(json JSONObject) bool + func (self *JSONValue) Interface() interface{} + func (this *JSONValue) Bool(keys ...string) (bool, error) + func (this *JSONValue) Contains(keys ...string) bool + func (this *JSONValue) ContainsIgnoreCases(keys ...string) bool + func (this *JSONValue) Float(keys ...string) (float64, error) + func (this *JSONValue) Get(keys ...string) (JSONObject, error) + func (this *JSONValue) GetArray(keys ...string) ([]JSONObject, error) + func (this *JSONValue) GetAt(i int, keys ...string) (JSONObject, error) + func (this *JSONValue) GetIgnoreCases(keys ...string) (JSONObject, error) + func (this *JSONValue) GetMap(keys ...string) (map[string]JSONObject, error) + func (this *JSONValue) GetString(keys ...string) (string, error) + func (this *JSONValue) GetTime(keys ...string) (time.Time, error) + func (this *JSONValue) Int(keys ...string) (int64, error) + func (this *JSONValue) IsZero() bool + func (this *JSONValue) PrettyString() string + func (this *JSONValue) QueryString() string + func (this *JSONValue) String() string + func (this *JSONValue) Unmarshal(obj interface{}, keys ...string) error + func (this *JSONValue) YAMLString() string