Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tuple ¶
type Tuple[T any] struct { // contains filtered or unexported fields }
Tuple Wrapper for structs that encodes/decodes json as a tuple, rather than dict
func (Tuple[T]) MarshalJSON ¶
MarshalJSON custom marshaller for tuple wrapped structs
func (*Tuple[T]) UnmarshalJSON ¶
UnmarshalJSON decodes Option from json. This works by creating a temp []interface{}, where each item in the slice is a pointer to the fields of the underlying tuple struct. Since it's pre-filled with pointers, unmarshal fills the pointers and checks the types
Click to show internal directories.
Click to hide internal directories.