Documentation ¶
Index ¶
- func Decode(ctx context.Context, content []byte) (any, error)
- func MarshallObjects(objects ...any) ([]byte, error)
- func MarshallObjectsContext(ctx context.Context, objects ...any) ([]byte, error)
- func Merge[T any](ctx context.Context, source T, destination T, disableAppend bool) (T, error)
- func MergeFrom[T any](ctx context.Context, rawSource json.RawMessage, rawDestination json.RawMessage, ...) (T, error)
- func MergeFromDestination[T any](ctx context.Context, source T, rawDestination json.RawMessage, ...) (T, error)
- func MergeFromSource[T any](ctx context.Context, rawSource json.RawMessage, destination T, ...) (T, error)
- func MergeJSON(ctx context.Context, rawSource json.RawMessage, rawDestination json.RawMessage, ...) (json.RawMessage, error)
- func Omitempty[T any](ctx context.Context, value T) (T, error)
- func UnmarshallExcluded(inputContent []byte, parentObject any, object any) error
- func UnmarshallExcludedContext(ctx context.Context, inputContent []byte, parentObject any, object any) error
- type JSONArray
- type JSONObject
- func (m *JSONObject) IsEmpty() bool
- func (m *JSONObject) MarshalJSON() ([]byte, error)
- func (m *JSONObject) MarshalJSONContext(ctx context.Context) ([]byte, error)
- func (m *JSONObject) UnmarshalJSON(content []byte) error
- func (m *JSONObject) UnmarshalJSONContext(ctx context.Context, content []byte) error
- type TypedMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshallObjects ¶ added in v0.5.0
func MarshallObjectsContext ¶
func MergeFrom ¶
func MergeFrom[T any](ctx context.Context, rawSource json.RawMessage, rawDestination json.RawMessage, disableAppend bool) (T, error)
func MergeFromDestination ¶
func MergeFromSource ¶
func MergeJSON ¶
func MergeJSON(ctx context.Context, rawSource json.RawMessage, rawDestination json.RawMessage, disableAppend bool) (json.RawMessage, error)
func UnmarshallExcluded ¶ added in v0.5.0
Types ¶
type JSONArray ¶
type JSONArray []any
func (JSONArray) MarshalJSON ¶
func (*JSONArray) UnmarshalJSON ¶
type JSONObject ¶
type JSONObject struct { linkedhashmap.Map[string, any] }
func (*JSONObject) IsEmpty ¶ added in v0.4.0
func (m *JSONObject) IsEmpty() bool
func (*JSONObject) MarshalJSON ¶
func (m *JSONObject) MarshalJSON() ([]byte, error)
func (*JSONObject) MarshalJSONContext ¶
func (m *JSONObject) MarshalJSONContext(ctx context.Context) ([]byte, error)
func (*JSONObject) UnmarshalJSON ¶
func (m *JSONObject) UnmarshalJSON(content []byte) error
func (*JSONObject) UnmarshalJSONContext ¶
func (m *JSONObject) UnmarshalJSONContext(ctx context.Context, content []byte) error
type TypedMap ¶
type TypedMap[K comparable, V any] struct { linkedhashmap.Map[K, V] }
func (TypedMap[K, V]) MarshalJSON ¶
func (TypedMap[K, V]) MarshalJSONContext ¶
func (*TypedMap[K, V]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.