Skip to main content

json_annotation_fs 0.1.0+1 copy "json_annotation_fs: ^0.1.0+1" to clipboard
json_annotation_fs: ^0.1.0+1 copied to clipboard

Safe JSON annotation package with error handling for Flutter/Dart. Extends json_annotation with robust parsing that prevents crashes on malformed or incomplete JSON data.

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.

0.1.0+1 2024-01-XX #

Added #

  • JsonSerializableFS annotation extending JsonSerializable with safe parsing
  • Safe parsers for primitive types:
    • SafeParseString / SafeParseStringNullable
    • SafeParseInt / SafeParseIntNullable
    • SafeParseDouble / SafeParseDoubleNullable
    • SafeParseBool / SafeParseBoolNullable
    • SafeParseDateTime / SafeParseDateTimeNullable
  • Safe parsers for collections:
    • SafeParseStringList / SafeParseStringListNullable
    • SafeParseIntList / SafeParseIntListNullable
    • SafeParseDoubleList / SafeParseDoubleListNullable
    • SafeParseBoolList / SafeParseBoolListNullable
  • Support for custom object lists with SafeParseCustomList / SafeParseCustomListNullable
  • Default field renaming to snake_case
  • Comprehensive test suite covering all parsing scenarios
  • Example project demonstrating usage patterns
  • Full documentation in README.md

Features #

  • Prevents crashes on malformed or incomplete JSON data
  • Returns sensible default values for missing fields
  • Type coercion for incompatible types (e.g., string to int)
  • Nullable field support with explicit annotations
  • Graceful error handling for all supported types
0
likes
150
points
2
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Safe JSON annotation package with error handling for Flutter/Dart. Extends json_annotation with robust parsing that prevents crashes on malformed or incomplete JSON data.

Homepage
Repository

License

MIT (license)

Dependencies

json_annotation

More

Packages that depend on json_annotation_fs