safe_json_annotation 0.2.2 copy "safe_json_annotation: ^0.2.2" to clipboard
safe_json_annotation: ^0.2.2 copied to clipboard

Runtime companion for safe_json_serializable — tolerant parse helpers and a re-export of json_annotation, so backend type changes never crash fromJson.

safe_json_annotation #

pub package license: MIT

Runtime companion for safe_json_serializable — the tolerant parse helpers (safeInt, safeString, …) that its generated code calls, plus a re-export of json_annotation so this is the only serialization import your models need.

Add it to your dependencies and see the safe_json_serializable README for full setup and behaviour.

dependencies:
  safe_json_annotation: ^0.2.2

dev_dependencies:
  safe_json_serializable: ^0.3.0
  build_runner: ^2.4.0
import 'package:safe_json_annotation/safe_json_annotation.dart';

part 'user.g.dart';

@JsonSerializable()
class User { /* … */ }

License #

MIT — see LICENSE.

1
likes
140
points
99
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Runtime companion for safe_json_serializable — tolerant parse helpers and a re-export of json_annotation, so backend type changes never crash fromJson.

Topics

#json #serialization #codegen #json-serializable

License

MIT (license)

Dependencies

json_annotation

More

Packages that depend on safe_json_annotation