Documentation ¶
Index ¶
- func LoadJSON[X any](inputPath string) (*X, error)
- func LoadTOML[X any](inputPath string) (*X, error)
- func MergeJSON[T any](in T, overrides ...map[string]any) (T, error)
- func WriteJSON[X any](value X, target ioutil.OutputTarget) error
- func WriteTOML[X any](value X, target ioutil.OutputTarget) error
- type Decoder
- type DecoderFactory
- type Encoder
- type EncoderFactory
- type LazySortedJsonMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DecoderFactory ¶ added in v1.9.3
type EncoderFactory ¶ added in v1.9.3
type LazySortedJsonMap ¶
type LazySortedJsonMap[K comparable, V any] map[K]V
LazySortedJsonMap provides sorted encoding order for JSON maps. The sorting is lazy: in-memory it's just a map, until it sorts just-in-time when the map is encoded to JSON. Warning: the just-in-time sorting requires a full allocation of the map structure and keys slice during encoding. Sorting order is not enforced when decoding from JSON.
func (LazySortedJsonMap[K, V]) MarshalJSON ¶
func (m LazySortedJsonMap[K, V]) MarshalJSON() ([]byte, error)
func (*LazySortedJsonMap[K, V]) UnmarshalJSON ¶
func (m *LazySortedJsonMap[K, V]) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.