Versions in this module Expand all Collapse all v0 v0.1.1 Aug 23, 2023 v0.1.0 Aug 18, 2023 Changes in this version + func JSONUnmarshal(data []byte, option ...DecodeOption) (any, error) + type Any struct + Opts DecodeOptions + Value any + func (v *Any) UnmarshalJSON(data []byte) error + func (v Any) MarshalJSON() ([]byte, error) + type Array = *List[any] + type DecodeOption func(opts *DecodeOptions) + func ObjectOnDuplicatedKey(strategy DuplicatedKeyStrategy) DecodeOption + func UseNumber(v bool) DecodeOption + func UseObject() DecodeOption + func UseObjectItems() DecodeOption + type DecodeOptions struct + func CreateDecodeOptions(option ...DecodeOption) DecodeOptions + func (opts *DecodeOptions) Apply(option ...DecodeOption) + type DuplicatedKeyStrategy uint8 + const Ignore + const KeepValueUpdateOrder + const UpdateValueKeepOrder + const UpdateValueUpdateOrder + type List struct + List []T + func NewList() *List[T] + func NewListFrom(list []T) *List[T] + func NewListWithCapacity(capacity int) *List[T] + func (l *List[T]) Append(value ...T) + func (l *List[T]) Delete(index int) + func (l *List[T]) Get(index int) T + func (l *List[T]) Len() int + func (l *List[T]) Set(index int, value T) + func (l *List[T]) UnmarshalJSON(data []byte) error + func (l List[T]) MarshalJSON() ([]byte, error) + type Map struct + func NewMap() *Map[K, V] + func NewMapWithCapacity(capacity int) *Map[K, V] + func (m *Map[K, V]) Add(key K, value V) + func (m *Map[K, V]) Append(pairs ...Pair[K, V]) + func (m *Map[K, V]) Clear() + func (m *Map[K, V]) Delete(key K) + func (m *Map[K, V]) DeleteByIndex(index int) + func (m *Map[K, V]) DuplicatedKeyStrategy() DuplicatedKeyStrategy + func (m *Map[K, V]) Filter(pred PairFilterFunc[K, V]) + func (m *Map[K, V]) Get(key K) (V, bool) + func (m *Map[K, V]) GetByIndex(index int) Pair[K, V] + func (m *Map[K, V]) GetKeyByIndex(index int) K + func (m *Map[K, V]) GetOrZeroValue(key K) V + func (m *Map[K, V]) GetValueByIndex(index int) V + func (m *Map[K, V]) Has(key K) bool + func (m *Map[K, V]) Keys() []K + func (m *Map[K, V]) Len() int + func (m *Map[K, V]) Pairs() *Pairs[K, V] + func (m *Map[K, V]) Set(key K, value V) + func (m *Map[K, V]) SetDuplicatedKeyStrategy(strategy DuplicatedKeyStrategy) + func (m *Map[K, V]) Sort(lessFunc PairLessFunc[K, V]) + func (m *Map[K, V]) UnmarshalJSON(data []byte) error + func (m *Map[K, V]) Values() []V + func (m Map[K, V]) MarshalJSON() ([]byte, error) + type Object = *Map[string, any] + type ObjectItems = *Pairs[string, any] + type Pair struct + Key K + Value V + func CreatePair(key K, value V) Pair[K, V] + type PairFilterFunc func(p *Pair[K, V]) bool + type PairLessFunc func(a, b *Pair[K, V]) bool + type Pairs struct + List []Pair[K, V] + func NewPairs() *Pairs[K, V] + func NewPairsFrom(list []Pair[K, V]) *Pairs[K, V] + func NewPairsWithCapacity(capacity int) *Pairs[K, V] + func (ps *Pairs[K, V]) Add(key K, value V) + func (ps *Pairs[K, V]) Append(pairs ...Pair[K, V]) + func (ps *Pairs[K, V]) Clear() + func (ps *Pairs[K, V]) Count(key K) int + func (ps *Pairs[K, V]) Dedup(strategy DuplicatedKeyStrategy) + func (ps *Pairs[K, V]) Delete(key K) + func (ps *Pairs[K, V]) DeleteByIndex(index int) + func (ps *Pairs[K, V]) Filter(pred PairFilterFunc[K, V]) + func (ps *Pairs[K, V]) Get(key K) []V + func (ps *Pairs[K, V]) GetByIndex(index int) Pair[K, V] + func (ps *Pairs[K, V]) GetFirstOrZeroValue(key K) (value V) + func (ps *Pairs[K, V]) GetKeyByIndex(index int) K + func (ps *Pairs[K, V]) GetLastOrZeroValue(key K) (value V) + func (ps *Pairs[K, V]) GetValueByIndex(index int) V + func (ps *Pairs[K, V]) Has(key K) bool + func (ps *Pairs[K, V]) Keys() []K + func (ps *Pairs[K, V]) Len() int + func (ps *Pairs[K, V]) SetByIndex(index int, key K, value V) + func (ps *Pairs[K, V]) SetKeyByIndex(index int, key K) + func (ps *Pairs[K, V]) SetValueByIndex(index int, value V) + func (ps *Pairs[K, V]) Sort(lessFunc PairLessFunc[K, V]) + func (ps *Pairs[K, V]) ToMap(strategy DuplicatedKeyStrategy) *Map[K, V] + func (ps *Pairs[K, V]) UnmarshalJSON(data []byte) error + func (ps *Pairs[K, V]) Values() []V + func (ps Pairs[K, V]) MarshalJSON() ([]byte, error)