Documentation ¶
Index ¶
- func Decode(content []byte) (any, error)
- func Merge[T any](source T, destination T) (T, error)
- func MergeFrom[T any](rawSource json.RawMessage, rawDestination json.RawMessage) (T, error)
- func MergeFromDestination[T any](source T, rawDestination json.RawMessage) (T, error)
- func MergeFromSource[T any](rawSource json.RawMessage, destination T) (T, error)
- func MergeJSON(rawSource json.RawMessage, rawDestination json.RawMessage) (json.RawMessage, error)
- func Omitempty[T any](value T) (T, error)
- type JSONArray
- type JSONObject
- type TypedMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeFrom ¶
func MergeFrom[T any](rawSource json.RawMessage, rawDestination json.RawMessage) (T, error)
func MergeFromDestination ¶
func MergeFromDestination[T any](source T, rawDestination json.RawMessage) (T, error)
func MergeFromSource ¶
func MergeFromSource[T any](rawSource json.RawMessage, destination T) (T, error)
func MergeJSON ¶
func MergeJSON(rawSource json.RawMessage, rawDestination json.RawMessage) (json.RawMessage, error)
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) UnmarshalJSON ¶
func (m *JSONObject) UnmarshalJSON(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]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.