dart_json_predicate 1.1.1

  • README.md
  • Installing
  • Versions
  • 0


A library for Dart which implements the JSON Predicate proposal: https://tools.ietf.org/id/draft-snell-json-test-01.html


A simple usage example:

import 'package:dart_json_predicate/json_predicate.dart' as jpredicate;

var testDocument = {
  "level1_0" : "This is a string value",
  "level1_1" : 5,
  "level1_2" : -3,
  "level1_3" : 3.2,
  "level1_4" : -2.2,
  "level1_5" : "2012-04-23T18:25:43.511Z",
  "level1_6" : ["Test 123", "abcdef"],
  "level1_7" : [5,6,7,8,9]

main() {
  var result = jpredicate.json(testDocument, {
    'op' : 'matches',
    'path' : '/level1_0',
    'value' : '[\\w\\s]*'


Take a look at the test cases for more examples.


All operators as specified in the proposal are available. Currently there is only support for the datatypes: string, number, boolean, array and undefined.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dart_json_predicate: ^1.1.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:dart_json_predicate/json_predicate.dart';
Version Uploaded Documentation Archive
1.1.1 Jul 18, 2016 Go to the documentation of dart_json_predicate 1.1.1 Download dart_json_predicate 1.1.1 archive
1.1.0 Jul 18, 2016 Go to the documentation of dart_json_predicate 1.1.0 Download dart_json_predicate 1.1.0 archive
1.0.0 Jul 11, 2016 Go to the documentation of dart_json_predicate 1.0.0 Download dart_json_predicate 1.0.0 archive
0.0.1 Jul 11, 2016 Go to the documentation of dart_json_predicate 0.0.1 Download dart_json_predicate 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0