Skip to content

Enhance field serialization control with @MappableField options#314

Open
itsarvinddev wants to merge 2 commits intoschultek:mainfrom
itsarvinddev:main
Open

Enhance field serialization control with @MappableField options#314
itsarvinddev wants to merge 2 commits intoschultek:mainfrom
itsarvinddev:main

Conversation

@itsarvinddev
Copy link

@itsarvinddev itsarvinddev commented Oct 2, 2025

Enhance field serialization control with @MappableField options

  • Introduced includeFromJson, includeToJson, and includeIfNull parameters to the @MappableField annotation for better control over field inclusion during serialization and deserialization.
  • Updated relevant documentation to reflect these changes and provide usage examples.
  • Adjusted internal logic to respect these new parameters in the mapping process.
  • Improved formatting and consistency in the README and model documentation.

This update enhances the flexibility of the dart_mappable library, allowing developers to fine-tune how fields are handled in JSON operations. #105

- Introduced `includeFromJson`, `includeToJson`, and `includeIfNull` parameters to the `@MappableField` annotation for better control over field inclusion during serialization and deserialization.
- Updated relevant documentation to reflect these changes and provide usage examples.
- Adjusted internal logic to respect these new parameters in the mapping process.
- Improved formatting and consistency in the README and model documentation.

This update enhances the flexibility of the `dart_mappable` library, allowing developers to fine-tune how fields are handled in JSON operations.
- Added `includeFromJson`, `includeToJson`, and `includeIfNull` parameters to various field definitions in mappers to improve control over serialization behavior.
- Updated multiple mappers to utilize these new parameters, ensuring consistent handling of field inclusion during JSON operations.
- Improved formatting and consistency in mapper definitions for better readability.

This update enhances the flexibility of the `dart_mappable` library, allowing developers to fine-tune how fields are serialized and deserialized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments