json_annotation_lenient 1.2.0 copy "json_annotation_lenient: ^1.2.0" to clipboard
json_annotation_lenient: ^1.2.0 copied to clipboard

Lenient JSON conversion for json_serializable — coerce loose int/double/num/bool/String/DateTime values instead of throwing, plus a drop-in build_runner builder that auto-fills type-based defaults for [...]

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add json_annotation_lenient

With Flutter:

 $ flutter pub add json_annotation_lenient

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  json_annotation_lenient: ^1.2.0

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:json_annotation_lenient/json_annotation_lenient.dart';
0
likes
130
points
146
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lenient JSON conversion for json_serializable — coerce loose int/double/num/bool/String/DateTime values instead of throwing, plus a drop-in build_runner builder that auto-fills type-based defaults for missing fields.

Homepage
Repository (GitHub)
View/report issues

Topics

#json #json-serializable #build-runner #codegen #serialization

License

MIT (license)

Dependencies

analyzer, build, dart_style, json_annotation, json_serializable, pub_semver, source_gen, yaml

More

Packages that depend on json_annotation_lenient