json_extractor 1.2.0
json_extractor: ^1.2.0 copied to clipboard
A minimal library to extract and flatten JSON values according to a user-specified map schema.
1.2.0 #
- Fixed maps that are not
Map<String, dynamic>(e.g.Map<dynamic, dynamic>fromMap.from, YAML or platform channels) causing anArgumentError. - Values along a path that are not a Map or a List now produce
nullinstead of throwing anArgumentError. extract: truewith a non-nullable type argument now throws a descriptiveFormatExceptioninstead of aTypeErrorwhen the extracted value is null.- Added the
strictoption to throw aFormatExceptionon missing paths. - Added the
keepNullsInListsoption to keep extracted lists index-aligned withincludeMissingPathEntries: false. - Added the
defaultsconstructor parameter for the values of null results. - Added list index segments (
items[0].id) and escaping (\.,\[,\\) in schema paths. Paths that contained[<digits>]or these escape sequences in keys are now interpreted differently. processAsListnow parses the schema once instead of for every element.- Raised the minimum Dart SDK version to
3.0.0. - Fixed outdated documentation.
1.1.2 #
- Fixed some mistakes in the README.
1.1.1 #
- Raised the maximum Dart SDK version to support Dart 3.
- Added the issue tracker link to the pubspec file.
1.1.0 #
- Fixed the signature of the methods, so they can take JSON in any cases.
- Added support for JSON arrays with
processAsListmethod. - Added the
extractoption to bothprocessandprocessAsListmethods.
1.0.2 #
- Changed minimal SDK version to
2.12.0to indicate the full null-safety support.
1.0.1 #
- Extended
pub.devpackage description.
1.0.0 #
- Initial version.