jsoncare_flutter 1.1.0 copy "jsoncare_flutter: ^1.1.0" to clipboard
jsoncare_flutter: ^1.1.0 copied to clipboard

A tolerant JSON-to-Dart model generator and safe parsing helper that prevents runtime crashes caused by API type mismatches.

1.1.0 #

  • Added JsonCare.numVal helper for flexible numeric parsing.
  • Enhanced JsonCare.intVal to handle decimal strings (e.g. "42.0" -> 42).
  • Enhanced JsonCare.boolVal to parse "t", "f", "on", "off", and non-zero numbers.
  • Enhanced JsonCare.enumValue with numeric index lookup (e.g. 0, "1"), case-insensitive matching, and modern Enum.name support.
  • Improved JsonCare.list with per-item try-catch isolation so single corrupted items do not discard remaining valid items.
  • Added Dart reserved keyword sanitization (defaultVal, isVal, classVal, etc.) in model generation.
  • Added multi-item array merging in TypeAnalyzer to infer fields across all array sample objects.
  • Added map type checking (json['key'] is Map) for nested object instantiation.
  • Added CLI --file / -f flag for generating models directly from JSON files.
  • Upgraded Dart SDK compatibility to ^3.12.0.

1.0.1 #

  • Added Example project.

1.0.0 #

  • Initial release.
  • Added JsonCare utility for safe parsing.
  • Added JsonCareGenerator for model generation from JSON strings.
  • Added CLI support for generating models.
0
likes
160
points
82
downloads

Documentation

API reference

Publisher

verified publisherrahulreza.com

Weekly Downloads

A tolerant JSON-to-Dart model generator and safe parsing helper that prevents runtime crashes caused by API type mismatches.

Homepage

Topics

#json #generator #safe-parsing #crash-prevention #model-generator

License

MIT (license)

Dependencies

args, flutter, path, recase

More

Packages that depend on jsoncare_flutter