nullable property

bool nullable
final

When true (the default), null fields are handled gracefully when encoding to JSON and when decoding null and nonexistent values from JSON.

Setting to false eliminates null verification in the generated code, which reduces the code size. Errors may be thrown at runtime if null values are encountered, but the original class should also implement null runtime validation if it's critical.

Implementation

final bool nullable