toon_serializable 1.0.1
toon_serializable: ^1.0.1 copied to clipboard
The official code generator for Token-Oriented Object Notation (TOON) models in Dart. Automatically generates TOON serialization code.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.1 - 2025-11-15 #
Changed #
- Updated dependencies to latest resolvable versions:
analyzer: ^6.4.1 → ^8.4.1build: ^2.4.1 → ^4.0.2source_gen: ^1.5.0 → ^4.0.2build_runner: ^2.4.9 → ^2.10.3lints: ^3.0.0 → ^6.0.0test: ^1.25.2 → ^1.27.0
Fixed #
- Resolved all pub.dev analysis issues:
- Fixed illegal
src/imports by using public API imports - Added missing type annotations to generator methods
- Fixed nullability handling for analyzer API changes
- Updated
TypeCheckerAPI usage for source_gen 4.0 compatibility - Removed deprecated
withNullabilityparameter usage
- Fixed illegal
1.0.0 - 2025-11-15 #
Added #
- Initial release of
toon_serializablecode generator - Support for
@ToonSerializableannotation to generate TOON serialization code - Automatic generation of
toToon()andfromToon()methods - Field renaming strategies:
FieldRename.snake- Converts camelCase to snake_caseFieldRename.kebab- Converts camelCase to kebab-caseFieldRename.pascal- Converts to PascalCaseFieldRename.camel- Converts to camelCase
- Support for custom field keys via
@ToonKeyannotation - Integration with
toon_dartpackage for encoding/decoding - Proper handling of nullable types
- List type casting support with automatic type conversion
- Support for
useTabularArraysconfiguration option strictKeysconfiguration option for validation
Technical Details #
- Built on
source_genandbuild_runnerinfrastructure - Uses
code_builderfor programmatic code generation - Generates
.partfiles compatible with Dart's part system - Full integration with Dart's analyzer for type checking
Known Limitations #
- Generated
.partfiles require manual addition ofpart ofdeclaration (see README for details)