JSONPath JavaScript Engine Compliance

This project evaluates how well different JavaScript JSONPath engines comply with the JSONPath standard (RFC 9535). The compliance tests are provided by https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.

Note: Only valid queries are evaluated due to the different approaches to error handling between engines.

The project is inspired by cburgmer’s JSONPath comparison which uses consensus among the engines instead of compliance with the standard.


View source

Overview

JSON P3 (v1.3.4) JSONPath Plus (v10.0.7) jsonpathly (v2.0.1) jsonpath-faster (v0.0.12) brunerd JSONPath (v0.9.19)
whitespace 100.0% 0.0% 33.33% 0.0% 23.08%
functions 100.0% 26.32% 26.32% 0.0% 0.0%
slice selector 100.0% 62.16% 62.16% 97.3% 97.3%
name selector 100.0% 31.58% 31.58% 31.58% 100.0%
index selector 100.0% 77.78% 100.0% 77.78% 100.0%
filter 100.0% 9.71% 9.71% 0.0% 0.0%
basic 100.0% 86.67% 73.33% 83.33% 96.67%
100.0% 21.63% 33.26% 18.6% 34.42%

Detailed Results

JSON P3 (v1.3.4) JSONPath Plus (v10.0.7) jsonpathly (v2.0.1) jsonpath-faster (v0.0.12) brunerd JSONPath (v0.9.19)
basic, root
basic, name shorthand
basic, name shorthand, extended unicode ☺
basic, name shorthand, underscore
basic, name shorthand, absent data
basic, name shorthand, array data
basic, wildcard shorthand, object data
basic, wildcard shorthand, array data
basic, wildcard selector, array data
basic, wildcard shorthand, then name shorthand
basic, multiple selectors
basic, multiple selectors, name and index, array data
basic, multiple selectors, name and index, object data
basic, multiple selectors, index and slice
basic, multiple selectors, index and slice, overlapping
basic, multiple selectors, duplicate index
basic, multiple selectors, wildcard and index
basic, multiple selectors, wildcard and name
basic, multiple selectors, wildcard and slice
basic, multiple selectors, multiple wildcards
basic, descendant segment, index
basic, descendant segment, name shorthand
basic, descendant segment, wildcard shorthand, array data
basic, descendant segment, wildcard selector, array data
basic, descendant segment, wildcard selector, nested arrays
basic, descendant segment, wildcard selector, nested objects
basic, descendant segment, wildcard shorthand, object data
basic, descendant segment, wildcard shorthand, nested data
basic, descendant segment, multiple selectors
basic, descendant segment, object traversal, multiple selectors
filter, existence, without segments
filter, existence
filter, existence, present with null
filter, equals string, single quotes
filter, equals numeric string, single quotes
filter, equals string, double quotes
filter, equals numeric string, double quotes
filter, equals number
filter, equals null
filter, equals null, absent from data
filter, equals true
filter, equals false
filter, equals self
filter, deep equality, arrays
filter, deep equality, objects
filter, not-equals string, single quotes
filter, not-equals numeric string, single quotes
filter, not-equals string, single quotes, different type
filter, not-equals string, double quotes
filter, not-equals numeric string, double quotes
filter, not-equals string, double quotes, different types
filter, not-equals number
filter, not-equals number, different types
filter, not-equals null
filter, not-equals null, absent from data
filter, not-equals true
filter, not-equals false
filter, less than string, single quotes
filter, less than string, double quotes
filter, less than number
filter, less than null
filter, less than true
filter, less than false
filter, less than or equal to string, single quotes
filter, less than or equal to string, double quotes
filter, less than or equal to number
filter, less than or equal to null
filter, less than or equal to true
filter, less than or equal to false
filter, greater than string, single quotes
filter, greater than string, double quotes
filter, greater than number
filter, greater than null
filter, greater than true
filter, greater than false
filter, greater than or equal to string, single quotes
filter, greater than or equal to string, double quotes
filter, greater than or equal to number
filter, greater than or equal to null
filter, greater than or equal to true
filter, greater than or equal to false
filter, exists and not-equals null, absent from data
filter, exists and exists, data false
filter, exists or exists, data false
filter, and
filter, or
filter, not expression
filter, not exists
filter, not exists, data null
filter, non-singular existence, wildcard
filter, non-singular existence, multiple
filter, non-singular existence, slice
filter, non-singular existence, negated
filter, nested
filter, name segment on primitive, selects nothing
filter, name segment on array, selects nothing
filter, index segment on object, selects nothing
filter, multiple selectors
filter, multiple selectors, comparison
filter, multiple selectors, overlapping
filter, multiple selectors, filter and index
filter, multiple selectors, filter and wildcard
filter, multiple selectors, filter and slice
filter, multiple selectors, comparison filter, index and slice
filter, equals number, zero and negative zero
filter, equals number, negative zero and zero
filter, equals number, with and without decimal fraction
filter, equals number, exponent
filter, equals number, exponent upper e
filter, equals number, positive exponent
filter, equals number, negative exponent
filter, equals number, exponent 0
filter, equals number, exponent -0
filter, equals number, exponent +0
filter, equals number, exponent leading -0
filter, equals number, exponent +00
filter, equals number, decimal fraction
filter, equals number, decimal fraction, trailing 0
filter, equals number, decimal fraction, exponent
filter, equals number, decimal fraction, positive exponent
filter, equals number, decimal fraction, negative exponent
filter, equals, special nothing
filter, equals, empty node list and empty node list
filter, equals, empty node list and special nothing
filter, object data
filter, and binds more tightly than or
filter, left to right evaluation
filter, group terms, left
filter, group terms, right
filter, string literal, single quote in double quotes
filter, string literal, double quote in single quotes
filter, string literal, escaped single quote in single quotes
filter, string literal, escaped double quote in double quotes
index selector, first element
index selector, second element
index selector, out of bound
index selector, min exact index
index selector, max exact index
index selector, negative
index selector, more negative
index selector, negative out of bound
index selector, on object
name selector, double quotes
name selector, double quotes, absent data
name selector, double quotes, array data
name selector, double quotes, embedded U+0020
name selector, double quotes, embedded U+007F
name selector, double quotes, supplementary plane character
name selector, double quotes, escaped double quote
name selector, double quotes, escaped reverse solidus
name selector, double quotes, escaped solidus
name selector, double quotes, escaped backspace
name selector, double quotes, escaped form feed
name selector, double quotes, escaped line feed
name selector, double quotes, escaped carriage return
name selector, double quotes, escaped tab
name selector, double quotes, escaped ☺, upper case hex
name selector, double quotes, escaped ☺, lower case hex
name selector, double quotes, surrogate pair 𝄞
name selector, double quotes, surrogate pair 😀
name selector, double quotes, before high surrogates
name selector, double quotes, after low surrogates
name selector, single quotes
name selector, single quotes, absent data
name selector, single quotes, array data
name selector, single quotes, embedded U+0020
name selector, single quotes, escaped single quote
name selector, single quotes, escaped reverse solidus
name selector, single quotes, escaped solidus
name selector, single quotes, escaped backspace
name selector, single quotes, escaped form feed
name selector, single quotes, escaped line feed
name selector, single quotes, escaped carriage return
name selector, single quotes, escaped tab
name selector, single quotes, escaped ☺, upper case hex
name selector, single quotes, escaped ☺, lower case hex
name selector, single quotes, surrogate pair 𝄞
name selector, single quotes, surrogate pair 😀
name selector, double quotes, empty
name selector, single quotes, empty
slice selector, slice selector
slice selector, slice selector with step
slice selector, slice selector with everything omitted, short form
slice selector, slice selector with everything omitted, long form
slice selector, slice selector with start omitted
slice selector, slice selector with start and end omitted
slice selector, negative step with default start and end
slice selector, negative step with default start
slice selector, negative step with default end
slice selector, larger negative step
slice selector, negative range with default step
slice selector, negative range with negative step
slice selector, negative range with larger negative step
slice selector, larger negative range with larger negative step
slice selector, negative from, positive to
slice selector, negative from
slice selector, positive from, negative to
slice selector, negative from, positive to, negative step
slice selector, positive from, negative to, negative step
slice selector, zero step
slice selector, empty range
slice selector, slice selector with everything omitted with empty array
slice selector, negative step with empty array
slice selector, maximal range with positive step
slice selector, maximal range with negative step
slice selector, excessively large to value
slice selector, excessively small from value
slice selector, excessively large from value with negative step
slice selector, excessively small to value with negative step
slice selector, excessively large step
slice selector, excessively small step
slice selector, start, min exact
slice selector, start, max exact
slice selector, end, min exact
slice selector, end, max exact
slice selector, step, min exact
slice selector, step, max exact
functions, count, count function
functions, count, single-node arg
functions, count, multiple-selector arg
functions, length, string data
functions, length, string data, unicode
functions, length, array data
functions, length, missing data
functions, length, number arg
functions, length, true arg
functions, length, false arg
functions, length, null arg
functions, length, arg is a function expression
functions, length, arg is special nothing
functions, match, found match
functions, match, double quotes
functions, match, regex from the document
functions, match, don't select match
functions, match, not a match
functions, match, select non-match
functions, match, non-string first arg
functions, match, non-string second arg
functions, match, filter, match function, unicode char class, uppercase
functions, match, filter, match function, unicode char class negated, uppercase
functions, match, filter, match function, unicode, surrogate pair
functions, match, dot matcher on \u2028
functions, match, dot matcher on \u2029
functions, match, arg is a function expression
functions, match, dot in character class
functions, match, escaped dot
functions, match, escaped backslash before dot
functions, match, escaped left square bracket
functions, match, escaped right square bracket
functions, match, explicit caret
functions, match, explicit dollar
functions, search, at the end
functions, search, double quotes
functions, search, at the start
functions, search, in the middle
functions, search, regex from the document
functions, search, don't select match
functions, search, not a match
functions, search, select non-match
functions, search, non-string first arg
functions, search, non-string second arg
functions, search, filter, search function, unicode char class, uppercase
functions, search, filter, search function, unicode char class negated, uppercase
functions, search, filter, search function, unicode, surrogate pair
functions, search, dot matcher on \u2028
functions, search, dot matcher on \u2029
functions, search, arg is a function expression
functions, search, dot in character class
functions, search, escaped dot
functions, search, escaped backslash before dot
functions, search, escaped left square bracket
functions, search, escaped right square bracket
functions, value, single-value nodelist
functions, value, multi-value nodelist
whitespace, filter, space between question mark and expression
whitespace, filter, newline between question mark and expression
whitespace, filter, tab between question mark and expression
whitespace, filter, return between question mark and expression
whitespace, filter, space between question mark and parenthesized expression
whitespace, filter, newline between question mark and parenthesized expression
whitespace, filter, tab between question mark and parenthesized expression
whitespace, filter, return between question mark and parenthesized expression
whitespace, filter, space between parenthesized expression and bracket
whitespace, filter, newline between parenthesized expression and bracket
whitespace, filter, tab between parenthesized expression and bracket
whitespace, filter, return between parenthesized expression and bracket
whitespace, filter, space between bracket and question mark
whitespace, filter, newline between bracket and question mark
whitespace, filter, tab between bracket and question mark
whitespace, filter, return between bracket and question mark
whitespace, functions, space between parenthesis and arg
whitespace, functions, newline between parenthesis and arg
whitespace, functions, tab between parenthesis and arg
whitespace, functions, return between parenthesis and arg
whitespace, functions, space between arg and comma
whitespace, functions, newline between arg and comma
whitespace, functions, tab between arg and comma
whitespace, functions, return between arg and comma
whitespace, functions, space between comma and arg
whitespace, functions, newline between comma and arg
whitespace, functions, tab between comma and arg
whitespace, functions, return between comma and arg
whitespace, functions, space between arg and parenthesis
whitespace, functions, newline between arg and parenthesis
whitespace, functions, tab between arg and parenthesis
whitespace, functions, return between arg and parenthesis
whitespace, functions, spaces in a relative singular selector
whitespace, functions, newlines in a relative singular selector
whitespace, functions, tabs in a relative singular selector
whitespace, functions, returns in a relative singular selector
whitespace, functions, spaces in an absolute singular selector
whitespace, functions, newlines in an absolute singular selector
whitespace, functions, tabs in an absolute singular selector
whitespace, functions, returns in an absolute singular selector
whitespace, operators, space before ||
whitespace, operators, newline before ||
whitespace, operators, tab before ||
whitespace, operators, return before ||
whitespace, operators, space after ||
whitespace, operators, newline after ||
whitespace, operators, tab after ||
whitespace, operators, return after ||
whitespace, operators, space before &&
whitespace, operators, newline before &&
whitespace, operators, tab before &&
whitespace, operators, return before &&
whitespace, operators, space after &&
whitespace, operators, newline after &&
whitespace, operators, tab after &&
whitespace, operators, return after &&
whitespace, operators, space before ==
whitespace, operators, newline before ==
whitespace, operators, tab before ==
whitespace, operators, return before ==
whitespace, operators, space after ==
whitespace, operators, newline after ==
whitespace, operators, tab after ==
whitespace, operators, return after ==
whitespace, operators, space before !=
whitespace, operators, newline before !=
whitespace, operators, tab before !=
whitespace, operators, return before !=
whitespace, operators, space after !=
whitespace, operators, newline after !=
whitespace, operators, tab after !=
whitespace, operators, return after !=
whitespace, operators, space before <
whitespace, operators, newline before <
whitespace, operators, tab before <
whitespace, operators, return before <
whitespace, operators, space after <
whitespace, operators, newline after <
whitespace, operators, tab after <
whitespace, operators, return after <
whitespace, operators, space before >
whitespace, operators, newline before >
whitespace, operators, tab before >
whitespace, operators, return before >
whitespace, operators, space after >
whitespace, operators, newline after >
whitespace, operators, tab after >
whitespace, operators, return after >
whitespace, operators, space before <=
whitespace, operators, newline before <=
whitespace, operators, tab before <=
whitespace, operators, return before <=
whitespace, operators, space after <=
whitespace, operators, newline after <=
whitespace, operators, tab after <=
whitespace, operators, return after <=
whitespace, operators, space before >=
whitespace, operators, newline before >=
whitespace, operators, tab before >=
whitespace, operators, return before >=
whitespace, operators, space after >=
whitespace, operators, newline after >=
whitespace, operators, tab after >=
whitespace, operators, return after >=
whitespace, operators, space between logical not and test expression
whitespace, operators, newline between logical not and test expression
whitespace, operators, tab between logical not and test expression
whitespace, operators, return between logical not and test expression
whitespace, operators, space between logical not and parenthesized expression
whitespace, operators, newline between logical not and parenthesized expression
whitespace, operators, tab between logical not and parenthesized expression
whitespace, operators, return between logical not and parenthesized expression
whitespace, selectors, space between root and bracket
whitespace, selectors, newline between root and bracket
whitespace, selectors, tab between root and bracket
whitespace, selectors, return between root and bracket
whitespace, selectors, space between bracket and bracket
whitespace, selectors, newline between bracket and bracket
whitespace, selectors, tab between bracket and bracket
whitespace, selectors, return between bracket and bracket
whitespace, selectors, space between root and dot
whitespace, selectors, newline between root and dot
whitespace, selectors, tab between root and dot
whitespace, selectors, return between root and dot
whitespace, selectors, space between bracket and selector
whitespace, selectors, newline between bracket and selector
whitespace, selectors, tab between bracket and selector
whitespace, selectors, return between bracket and selector
whitespace, selectors, space between selector and bracket
whitespace, selectors, newline between selector and bracket
whitespace, selectors, tab between selector and bracket
whitespace, selectors, return between selector and bracket
whitespace, selectors, space between selector and comma
whitespace, selectors, newline between selector and comma
whitespace, selectors, tab between selector and comma
whitespace, selectors, return between selector and comma
whitespace, selectors, space between comma and selector
whitespace, selectors, newline between comma and selector
whitespace, selectors, tab between comma and selector
whitespace, selectors, return between comma and selector
whitespace, slice, space between start and colon
whitespace, slice, newline between start and colon
whitespace, slice, tab between start and colon
whitespace, slice, return between start and colon
whitespace, slice, space between colon and end
whitespace, slice, newline between colon and end
whitespace, slice, tab between colon and end
whitespace, slice, return between colon and end
whitespace, slice, space between end and colon
whitespace, slice, newline between end and colon
whitespace, slice, tab between end and colon
whitespace, slice, return between end and colon
whitespace, slice, space between colon and step
whitespace, slice, newline between colon and step
whitespace, slice, tab between colon and step
whitespace, slice, return between colon and step

View source

Made by Tobias Schranz