disallowNullValue property

bool disallowNullValue
final

If true, generated code will throw a DisallowedNullValueException if the corresponding key exits, but the value is null.

Note: this value does not affect the behavior of a JSON map without the associated key.

If disallowNullValue is true, includeIfNull will be treated as false to ensure compatibility between toJson and fromJson.

If both includeIfNull and disallowNullValue are set to true on the same field, an exception will be thrown during code generation.

Implementation

final bool disallowNullValue