allowNullAsDefault
Allow NULL values to be accepted during deserialization when the
json_null="null" attribute is not explicitly specified.
Syntax
allowNullAsDefault = value
The value parameter is a BDL boolean (1 to allow NULL values
without the json_null="null" attribute, or 0 to disallow them).
The default is 0.
Usage
This option allows NULL values to be accepted during deserialization when the json_null="null" attribute is not explicitly specified on the target field.
By default, NULL values are rejected during deserialization unless the
json_null="null" attribute is explicitly set on the affected field. Enabling
allowNullAsDefault provides a more permissive behavior by allowing
NULL values as defaults for fields without this attribute.
Affects
Deserialization (JSON to BDL)
Example
To allow NULL values during deserialization without requiring the json_null="null" attribute:
CALL json.Serializer.setOption("allowNullAsDefault", 1)
For more examples, go to Deserializing JSON nulls with allowNullAsDefault