-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Problem Statement
Dart’s current serialization approach struggles with APIs that distinguish between null as an explicit value and the absence of a value (undefined). This limitation affects interoperability with APIs that require null to be treated as a meaningful value rather than as a missing field.
Currently, Dart developers must choose how to handle nullable fields globally or per object during de/serialization, leading to inconsistencies, extra boilerplate, and potential data loss or misinterpretation when integrating with external APIs.
Expected Behavior
It would be great to have more flexible serialization mechanism that allows developers to:
- Explicitly differentiate null from missing fields in JSON and other serialized formats.
- Define handling strategies per field, object, or globally, rather than relying on a single approach across an entire project.
- Ensure better interoperability with APIs that depend on null as a valid data state.
Metadata
Metadata
Assignees
Labels
No labels