dart_json_predicate 1.1.1

  • README.md
  • Installing
  • Versions
  • 37


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.

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

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages 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


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
34 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, web, other

No platform restriction found in libraries.


  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Use constrained dependencies.

    The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: logging.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
logging any 0.11.3+1
Dev dependencies
test >=0.12.0 <0.13.0