json_annotation_lenient 1.2.0
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_lenientWith Flutter:
$ flutter pub add json_annotation_lenientThis 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.0Alternatively, 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';