toon_serializable 1.0.1 copy "toon_serializable: ^1.0.1" to clipboard
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.1
    • build: ^2.4.1 → ^4.0.2
    • source_gen: ^1.5.0 → ^4.0.2
    • build_runner: ^2.4.9 → ^2.10.3
    • lints: ^3.0.0 → ^6.0.0
    • test: ^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 TypeChecker API usage for source_gen 4.0 compatibility
    • Removed deprecated withNullability parameter usage

1.0.0 - 2025-11-15 #

Added #

  • Initial release of toon_serializable code generator
  • Support for @ToonSerializable annotation to generate TOON serialization code
  • Automatic generation of toToon() and fromToon() methods
  • Field renaming strategies:
    • FieldRename.snake - Converts camelCase to snake_case
    • FieldRename.kebab - Converts camelCase to kebab-case
    • FieldRename.pascal - Converts to PascalCase
    • FieldRename.camel - Converts to camelCase
  • Support for custom field keys via @ToonKey annotation
  • Integration with toon_dart package for encoding/decoding
  • Proper handling of nullable types
  • List type casting support with automatic type conversion
  • Support for useTabularArrays configuration option
  • strictKeys configuration option for validation

Technical Details #

  • Built on source_gen and build_runner infrastructure
  • Uses code_builder for programmatic code generation
  • Generates .part files compatible with Dart's part system
  • Full integration with Dart's analyzer for type checking

Known Limitations #

  • Generated .part files require manual addition of part of declaration (see README for details)
1
likes
150
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

The official code generator for Token-Oriented Object Notation (TOON) models in Dart. Automatically generates TOON serialization code.

Repository (GitHub)
View/report issues

Topics

#code-generation #serialization #build-runner #toon #codegen

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, build, code_builder, meta, source_gen, toon_annotation, toon_dart

More

Packages that depend on toon_serializable