type
Input
A presence-aware value used by nullable generated Go mutation fields.
Properties
| Property | Type | Description |
|---|---|---|
MarshalJSON() | ([]byte, | Encode the concrete value or explicit null marker. |
How it works
A nil *Input omits the field, Set emits a concrete JSON value, and Null emits explicit JSON null. This preserves outbound partial-update semantics that an ordinary *T cannot represent.
Get inspects a concrete value. Generated field codecs preserve explicit nullable values when decoding; non-null wrappers reject JSON null.
Full signature
type Input[T any] struct {
// contains filtered or unexported fields
}Methods
Input.MarshalJSON()MarshalJSON implements json.Marshaler. Nil *Input fields are omitted by the generated parent struct's omitempty tag before this method is called.
Input.Get()Get returns the concrete value, or the zero value and false for omission or explicit null. A non-nil input with no concrete value represents explicit null.
Input.UnmarshalJSON()UnmarshalJSON preserves a concrete or explicit-null mutation value.