Documentation
¶
Index ¶
- func Copy(m utils.JSON) utils.JSON
- func DeepMerge(x1, x2 utils.JSON) utils.JSON
- func DeepMerge2(x1, x2 utils.JSON) utils.JSON
- func Encapsulate(envelopeName string, data utils.JSON) utils.JSON
- func GetBool(kv utils.JSON, k string) (bool, error)
- func GetBoolWithDefault(kv utils.JSON, k string, defaultValue bool) bool
- func GetFloat32(kv utils.JSON, k string) (v float32, err error)
- func GetFloat64(kv utils.JSON, k string) (v float64, err error)
- func GetInt(kv utils.JSON, k string) (v int, err error)
- func GetInt64(kv utils.JSON, k string) (v int64, err error)
- func GetInt64WithDefault(kv utils.JSON, k string, defaultValue int64) (v int64, err error)
- func GetIntWithDefault(kv utils.JSON, k string, defaultValue int) (v int, err error)
- func GetNumber[A Number](kv utils.JSON, k string) (v A, err error)
- func GetNumberWithDefault[A Number](kv utils.JSON, k string, defaultValue A) (v A)
- func GetString(kv utils.JSON, k string) (v string, err error)
- func GetTime(kv utils.JSON, k string) (v time.Time, err error)
- func GetValueWithFieldPathString(fieldPath string, data utils.JSON) (any, error)
- func MapStringStringCopy(m map[string]string) map[string]string
- func MarshalableMerge(x1, x2 any) (any, error)
- func MustGetInt64(kv utils.JSON, k string) (v int64)
- func PrettyPrint(v utils.JSON) (string, error)
- func ReplaceMergeMap(m1 utils.JSON, m2 utils.JSON) utils.JSON
- func ResponseBodyToJSON(r *http.Response) (utils.JSON, error)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInt64WithDefault ¶
func GetIntWithDefault ¶
func GetNumberWithDefault ¶
func MarshalableMerge ¶
MarshalableMerge merges the two JSON-marshalable values x1 and x2, preferring x1 over x2 except where x1 and x2 are JSON objects, in which case the keys from both objects are included and their values merged recursively.
It returns an error if x1 or x2 cannot be JSON-marshaled.
Types ¶
Click to show internal directories.
Click to hide internal directories.