Documentation
¶
Index ¶
- func GetAnyTypedChildArray(m *MapThing, key string) ([]any, bool)
- func GetArrayLen(a ordered.OrderedArray) int
- func GetChildArray(m *MapThing, key string) (ordered.OrderedArray, bool)
- func GetTypedChildArray[T any](m *MapThing, key string) ([]T, bool)
- func GetValue[T any](m *MapThing, key string) (T, bool)
- func GetValueAt[T any](a ordered.OrderedArray, index int) (T, error)
- func HasValue(m *MapThing, key string) bool
- func IterateOverArray[T any](array any, castFunc CastFunc2[T]) iter.Seq2[int, T]
- func NewOrderedValue[T any](value T) (ordered.OrderedValue, error)
- func OrderedPair2Value(value ordered.OrderedPair) (any, bool)
- func OrderedValue2Value[T any](value ordered.OrderedValue) (T, bool)
- func Remove(m *MapThing, key string)
- func Set[T any](m *MapThing, key string, value T) error
- func ToText(v any) string
- type CastFunc
- type CastFunc2
- type MapThing
- func (m *MapThing) Iterate() iter.Seq2[string, any]
- func (m *MapThing) IterateOverMaps() iter.Seq2[string, MapThing]
- func (m *MapThing) IterateToValue(castFunc CastFunc) iter.Seq2[string, any]
- func (m *MapThing) Len() (int, error)
- func (m *MapThing) Serialize() ([]byte, error)
- func (m *MapThing) SerializeJSONFile(fileName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetArrayLen ¶
func GetArrayLen(a ordered.OrderedArray) int
func GetChildArray ¶
func GetChildArray(m *MapThing, key string) (ordered.OrderedArray, bool)
func GetValueAt ¶
func GetValueAt[T any](a ordered.OrderedArray, index int) (T, error)
func IterateOverArray ¶
func NewOrderedValue ¶ added in v0.2.0
func NewOrderedValue[T any](value T) (ordered.OrderedValue, error)
func OrderedPair2Value ¶
func OrderedPair2Value(value ordered.OrderedPair) (any, bool)
func OrderedValue2Value ¶
func OrderedValue2Value[T any](value ordered.OrderedValue) (T, bool)
Types ¶
type MapThing ¶
type MapThing struct {
// contains filtered or unexported fields
}
func NewFromJSON ¶
func NewFromJSONFile ¶
func NewMapThing ¶ added in v0.2.0
func NewMapThing() MapThing
func (*MapThing) IterateOverMaps ¶
helps to interate over sub dictionaries
func (*MapThing) IterateToValue ¶
func (*MapThing) SerializeJSONFile ¶
Click to show internal directories.
Click to hide internal directories.