public static enum RowJson.RowJsonDeserializer.NullBehavior extends java.lang.Enum<RowJson.RowJsonDeserializer.NullBehavior>
RowJson.RowJsonDeserializer
should expect null values
to be represented.
For example, when parsing JSON for the Schema (str: REQUIRED STRING, int: NULLABLE
INT64)
:
REQUIRE_NULL
, {"str": "foo", "int": null}
would be
accepted.
REQUIRE_MISSING
, {"str": "bar"}
would be accepted,
and would yield a Row
with null
for the int
field.
ALLOW_MISSING_OR_NULL
, either JSON string would be accepted.
Enum Constant and Description |
---|
ACCEPT_MISSING_OR_NULL
Specifies that a null value may be represented as either a missing field or a null value in
the input JSON.
|
REQUIRE_MISSING
Specifies that a null value must be represented with a missing field in JSON.
|
REQUIRE_NULL
Specifies that a null value must be represented with a null value in JSON.
|
Modifier and Type | Method and Description |
---|---|
static RowJson.RowJsonDeserializer.NullBehavior |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RowJson.RowJsonDeserializer.NullBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RowJson.RowJsonDeserializer.NullBehavior ACCEPT_MISSING_OR_NULL
public static final RowJson.RowJsonDeserializer.NullBehavior REQUIRE_NULL
RowJson.UnsupportedRowJsonException
will be thrown.public static final RowJson.RowJsonDeserializer.NullBehavior REQUIRE_MISSING
RowJson.UnsupportedRowJsonException
will be thrown.public static RowJson.RowJsonDeserializer.NullBehavior[] values()
for (RowJson.RowJsonDeserializer.NullBehavior c : RowJson.RowJsonDeserializer.NullBehavior.values()) System.out.println(c);
public static RowJson.RowJsonDeserializer.NullBehavior valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null