A class representing a serializable JSON field.
sealed public class JsonField<out T : Any>A class representing a serializable JSON field. It can either be a [KnownValue] value of type [T], matching the type the SDK expects, or an arbitrary JSON value that bypasses the type system (via [JsonValue]).
Returns whether this field is missing, which means it will be omitted from the serialized JSON entirely..
Whether this field is explicitly set to null..
Returns an [Optional] containing this field's "known" value, meaning it matches the type the SDK expects, or an empty [Optional] if this field contains an arbitrary [JsonValue].
Returns an [Optional] containing this field's arbitrary [JsonValue], meaning it mismatches the type the SDK expects, or an empty [Optional] if this field contains a "known" value.
Returns an [Optional] containing this field's boolean value, or an empty [Optional] if it doesn't contain a boolean.
Returns an [Optional] containing this field's numerical value, or an empty [Optional] if it doesn't contain a number.
Returns an [Optional] containing this field's string value, or an empty [Optional] if it doesn't contain a string.
Returns an [Optional] containing this field's list value, or an empty [Optional] if it doesn't contain a list.
Returns an [Optional] containing this field's map value, or an empty [Optional] if it doesn't contain a map.
Returns the result of calling the [visitor] method corresponding to this field's state..
Returns a [JsonField] containing the given "known" [value]..
Returns a [JsonField] containing the given "known" [value], or [JsonNull] if [value] is null..
Returns the result of calling the [visitor] method corresponding to this field's state..
The default implementation for unimplemented visitor methods..
Converts the given [value] to a [JsonValue].
Returns a [JsonValue] converted from the given Jackson [JsonNode]..