squint_json 0.0.5 icon indicating copy to clipboard operation
squint_json: ^0.0.5 copied to clipboard

Lightweight JSON processor and AST. Safely (de)serialize JSON decoded Strings to Dart Types.

GitHub pub CodeScene Code Health codecov

Lightweight JSON processor and AST. Safely deserialize JSON decoded Strings to Dart Types. A JSON decoding library that actually decodes nested lists. No more dynamic mapping!


const example = """
{
  "aRidiculousListOfLists": [ [ [ [ "Lugia", "Ho-Oh" ], [ "Pikachu!" ] ] ] ]
}""";

final decoded = example.jsonDecode;
final myArray = decoded.array("aRidiculousListOfLists");
expect(myArray.data[0][0][0][0], "Lugia");
expect(myArray.data[0][0][0][1], "Ho-Oh");

Features #

  • Deserialize JSON properly including (nested) arrays.
  • Deserialize JSON without writing data classes.
  • Generate data classes from JSON content.
  • Generate boilerplate for JSON processing programmatically.
  • Generate boilerplate for JSON processing through cli.
  • Format JSON messages.
  • Does not require build_runner.
  • Does not require dart:mirrors.
  • Extensible: Write and reuse custom JSON data converters.

Documentation #

For latest release see 0.0.5.

1
likes
130
pub points
21%
popularity

Publisher

verified publisher iconbuijs.dev

Lightweight JSON processor and AST. Safely (de)serialize JSON decoded Strings to Dart Types.

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

analyzer, dart_style, path

More

Packages that depend on squint_json