Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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.