Documentation
¶
Overview ¶
Package optional provides generic optional fields for JSON presence detection using encoding/json/v2. Supports omitted, null, empty, and valued field states.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field[T any] struct { Value T // The field's value Present bool // Whether the field was present in JSON }
Field represents an optional field that can distinguish between omitted, null, empty, and valued states. The Present field indicates whether the field was present in the JSON input.
Click to show internal directories.
Click to hide internal directories.