Documentation
¶
Overview ¶
Package jsonx provides generic helpers for JSON encoding/decoding and conversion between structs and maps.
Index ¶
- func AnyToStruct(data any, target any) error
- func FromJSON[T any](jsonStr string, target T) error
- func MapTo[T any](m map[string]any) (T, error)
- func MapToArray[T any](m []map[string]any) ([]T, error)
- func ToJSON[T any](data T) (string, error)
- func ToMap[T any](t T) (map[string]any, error)
- func ToMapArray[T any](t []T) ([]map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToStruct ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.