Versions in this module Expand all Collapse all v0 v0.0.2 Nov 11, 2025 Changes in this version + const Omit + var EscapeSJSONKey = strings.NewReplacer("\\", "\\\\", "|", "\\|", "#", "\\#", "@", "\\@", "*", "\\*", ".", "\\.", ":", "\\:", "?", "\\?").Replace + func IsNull[T any](v T) bool + func IsOmitted(v any) bool + func MarshalObject[T ParamStruct](f T, underlying any) ([]byte, error) + func MarshalUnion[T ParamStruct](metadata T, variants ...any) ([]byte, error) + func MarshalWithExtras[T ParamStruct, R any](f T, underlying any, extras map[string]R) ([]byte, error) + func NullMap[MapT ~map[string]T, T any]() MapT + func NullSlice[SliceT ~[]T, T any]() SliceT + func NullStruct[T ParamStruct, PtrT InferPtr[T]]() T + func Override[T ParamStruct, PtrT InferPtr[T]](v any) T + type APIObject struct + func (m *APIObject) SetExtraFields(extraFields map[string]any) + func (m APIObject) ExtraFields() map[string]any + func (m APIObject) Overrides() (any, bool) + type APIUnion struct + func (m *APIUnion) SetExtraFields(extraFields map[string]any) + func (m APIUnion) ExtraFields() map[string]any + func (m APIUnion) Overrides() (any, bool) + type EncodedAsDate Opt[time.Time] + func (m EncodedAsDate) MarshalJSON() ([]byte, error) + type InferPtr interface + type Opt struct + Value T + func NewOpt[T comparable](v T) Opt[T] + func Null[T comparable]() Opt[T] + func (o *Opt[T]) UnmarshalJSON(data []byte) error + func (o Opt[T]) MarshalJSON() ([]byte, error) + func (o Opt[T]) MarshalJSONWithTimeLayout(format string) []byte + func (o Opt[T]) Or(v T) T + func (o Opt[T]) String() string + func (o Opt[T]) Valid() bool + type Optional interface + Valid func() bool + type ParamNullable interface + type ParamStruct interface + Overrides func() (any, bool)