jsafe 1.0.0 copy "jsafe: ^1.0.0" to clipboard
jsafe: ^1.0.0 copied to clipboard

Resilient JSON parsing utilities and json_serializable converters for Dart/Flutter.

Changelog #

All notable changes to this project will be documented in this file.

1.0.0 - 2025-10-23 #

Added #

  • Fully resilient JSON parsing utilities for Dart/Flutter.
  • Safe scalar parsing methods:
    • Non-nullable: string, integer, double_, boolean, number
    • Nullable: stringN, integerN, doubleN, booleanN, numberN
  • DateTime parsing: dateTime and dateTimeN (supports ISO & epoch-millis)
  • Enum parsing helper: enumValue with fallback
  • Deep getter for nested maps/lists: JSafe.getAt(map, 'a.b[0].c')
  • List mapping helper: JSafe.mapList for nested objects
  • Recursive null-omitting helper: JSafe.omitNulls
  • Debug & strict mode toggles: JSafe.debugLogs and JSafe.strictThrow
  • CLI JSON-to-Dart model generator:
    • Generate nested Dart models automatically from JSON
    • Handles lists, nested objects, and non-nullable fields
    • Ensures fully serializable toJson output

Changed #

  • Method names updated from old aliases (str/int_/dbl/bool_/num_) to more descriptive names.
  • Updated README and docs to highlight CLI usage.

Fixed #

  • Improved parsing of numeric strings with commas (e.g., "1,234.56")
  • Safe handling of nulls, type mismatches, and malformed JSON
7
likes
0
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

Resilient JSON parsing utilities and json_serializable converters for Dart/Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, json_annotation, meta, path

More

Packages that depend on jsafe