├── .gitignore ├── ANALYSIS.md ├── CONTRIBUTING.md ├── FAQ.md ├── INTERESTING_QUERIES ├── LICENSE ├── OPEN_QUESTIONS.md ├── QUERY_NAMING_PATTERN.md ├── README.md ├── TODO ├── bug_reports ├── Bash_JSONPath.sh.md ├── C_json-glib.md ├── Clojure_json-path.md ├── Cpp_jsoncons.md ├── Dart_json_path.md ├── Elixir_ExJsonPath.md ├── Elixir_jaxon.md ├── Elixir_warpath.md ├── Erlang_ejsonpath.md ├── Golang_github.com-PaesslerAG-jsonpath.md ├── Golang_github.com-bhmj-jsonslice.md ├── Golang_github.com-ohler55-ojg.md ├── Golang_github.com-oliveagle-jsonpath.md ├── Golang_github.com-spyzhov-ajson.md ├── Golang_github.com-vmware-labs-yaml-jsonpath.md ├── Haskell_jsonpath.md ├── JavaScript_Goessner.md ├── JavaScript_brunerd.md ├── JavaScript_json-p3.md ├── JavaScript_jsonpath-plus.md ├── JavaScript_jsonpath.md ├── JavaScript_jsonpathly.md ├── Java_com.github.jsurfer.md ├── Java_com.jayway.jsonpath.md ├── Kotlin_com.nfeld.jsonpathkt.md ├── Objective-C_SMJJSONPath.md ├── PHP_Goessner.md ├── PHP_galbar-jsonpath.md ├── PHP_remorhaz-jsonpath.md ├── PHP_softcreatr-jsonpath.md ├── Perl_JSON-Path.md ├── Python_jsonpath-ng.md ├── Python_jsonpath-rw.md ├── Python_jsonpath.md ├── Python_jsonpath2.md ├── Python_python-jsonpath.md ├── Raku_JSON-Path.md ├── Ruby_jsonpath.md ├── Rust_jsonpath.md ├── Rust_jsonpath_lib.md ├── Rust_jsonpath_plus.md ├── Rust_serde_json_path.md ├── Scala_jsonpath.md ├── Swift_Sextant.md ├── dotNET_Json.NET.md ├── dotNET_JsonCons.JsonPath.md ├── dotNET_JsonPath.Net.md ├── dotNET_JsonPathLib.md └── dotNET_Manatee.Json.md ├── build.ninja ├── comparison └── README.md ├── docs ├── index.html └── results │ ├── array_slice.html │ ├── array_slice_on_exact_match.html │ ├── array_slice_on_non_overlapping_array.html │ ├── array_slice_on_object.html │ ├── array_slice_on_partially_overlapping_array.html │ ├── array_slice_with_large_number_for_end.html │ ├── array_slice_with_large_number_for_end_and_negative_step.html │ ├── array_slice_with_large_number_for_start.html │ ├── array_slice_with_large_number_for_start_end_negative_step.html │ ├── array_slice_with_negative_start_and_end_and_range_of_-1.html │ ├── array_slice_with_negative_start_and_end_and_range_of_0.html │ ├── array_slice_with_negative_start_and_end_and_range_of_1.html │ ├── array_slice_with_negative_start_and_positive_end_and_range_of_-1.html │ ├── array_slice_with_negative_start_and_positive_end_and_range_of_0.html │ ├── array_slice_with_negative_start_and_positive_end_and_range_of_1.html │ ├── array_slice_with_negative_step.html │ ├── array_slice_with_negative_step_and_start_greater_than_end.html │ ├── array_slice_with_negative_step_on_partially_overlapping_array.html │ ├── array_slice_with_negative_step_only.html │ ├── array_slice_with_open_end.html │ ├── array_slice_with_open_end_and_negative_step.html │ ├── array_slice_with_open_start.html │ ├── array_slice_with_open_start_and_end.html │ ├── array_slice_with_open_start_and_end_and_step_empty.html │ ├── array_slice_with_open_start_and_end_on_object.html │ ├── array_slice_with_open_start_and_negative_step.html │ ├── array_slice_with_positive_start_and_negative_end_and_range_of_-1.html │ ├── array_slice_with_positive_start_and_negative_end_and_range_of_0.html │ ├── array_slice_with_positive_start_and_negative_end_and_range_of_1.html │ ├── array_slice_with_range_of_-1.html │ ├── array_slice_with_range_of_0.html │ ├── array_slice_with_range_of_1.html │ ├── array_slice_with_start_-1_and_open_end.html │ ├── array_slice_with_start_-2_and_open_end.html │ ├── array_slice_with_start_large_negative_number_and_open_end_on_short_array.html │ ├── array_slice_with_step.html │ ├── array_slice_with_step_0.html │ ├── array_slice_with_step_1.html │ ├── array_slice_with_step_and_leading_zeros.html │ ├── array_slice_with_step_but_end_not_aligned.html │ ├── array_slice_with_step_empty.html │ ├── array_slice_with_step_only.html │ ├── bracket_notation.html │ ├── bracket_notation_after_recursive_descent.html │ ├── bracket_notation_on_object_without_key.html │ ├── bracket_notation_with_NFC_path_on_NFD_key.html │ ├── bracket_notation_with_dot.html │ ├── bracket_notation_with_double_quotes.html │ ├── bracket_notation_with_empty_path.html │ ├── bracket_notation_with_empty_string.html │ ├── bracket_notation_with_empty_string_doubled_quoted.html │ ├── bracket_notation_with_negative_number_on_short_array.html │ ├── bracket_notation_with_number.html │ ├── bracket_notation_with_number_-1.html │ ├── bracket_notation_with_number_-1_on_empty_array.html │ ├── bracket_notation_with_number_0.html │ ├── bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length.html │ ├── bracket_notation_with_number_on_object.html │ ├── bracket_notation_with_number_on_short_array.html │ ├── bracket_notation_with_number_on_string.html │ ├── bracket_notation_with_quoted_array_slice_literal.html │ ├── bracket_notation_with_quoted_closing_bracket_literal.html │ ├── bracket_notation_with_quoted_current_object_literal.html │ ├── bracket_notation_with_quoted_dot_literal.html │ ├── bracket_notation_with_quoted_dot_wildcard.html │ ├── bracket_notation_with_quoted_double_quote_literal.html │ ├── bracket_notation_with_quoted_escaped_backslash.html │ ├── bracket_notation_with_quoted_escaped_single_quote.html │ ├── bracket_notation_with_quoted_number_on_object.html │ ├── bracket_notation_with_quoted_root_literal.html │ ├── bracket_notation_with_quoted_special_characters_combined.html │ ├── bracket_notation_with_quoted_string_and_unescaped_single_quote.html │ ├── bracket_notation_with_quoted_union_literal.html │ ├── bracket_notation_with_quoted_wildcard_literal.html │ ├── bracket_notation_with_quoted_wildcard_literal_on_object_without_key.html │ ├── bracket_notation_with_spaces.html │ ├── bracket_notation_with_string_including_dot_wildcard.html │ ├── bracket_notation_with_two_literals_separated_by_dot.html │ ├── bracket_notation_with_two_literals_separated_by_dot_without_quotes.html │ ├── bracket_notation_with_wildcard_after_array_slice.html │ ├── bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard.html │ ├── bracket_notation_with_wildcard_after_recursive_descent.html │ ├── bracket_notation_with_wildcard_on_array.html │ ├── bracket_notation_with_wildcard_on_empty_array.html │ ├── bracket_notation_with_wildcard_on_empty_object.html │ ├── bracket_notation_with_wildcard_on_null_value_array.html │ ├── bracket_notation_with_wildcard_on_object.html │ ├── bracket_notation_without_quotes.html │ ├── current_with_dot_notation.html │ ├── dot_bracket_notation.html │ ├── dot_bracket_notation_with_double_quotes.html │ ├── dot_bracket_notation_without_quotes.html │ ├── dot_notation.html │ ├── dot_notation_after_array_slice.html │ ├── dot_notation_after_bracket_notation_after_recursive_descent.html │ ├── dot_notation_after_bracket_notation_with_wildcard.html │ ├── dot_notation_after_bracket_notation_with_wildcard_on_one_matching.html │ ├── dot_notation_after_bracket_notation_with_wildcard_on_some_matching.html │ ├── dot_notation_after_filter_expression.html │ ├── dot_notation_after_recursive_descent.html │ ├── dot_notation_after_recursive_descent_after_dot_notation.html │ ├── dot_notation_after_recursive_descent_with_extra_dot.html │ ├── dot_notation_after_union.html │ ├── dot_notation_after_union_with_keys.html │ ├── dot_notation_on_array.html │ ├── dot_notation_on_array_value.html │ ├── dot_notation_on_array_with_containing_object_matching_key.html │ ├── dot_notation_on_empty_object_value.html │ ├── dot_notation_on_null_value.html │ ├── dot_notation_on_object_without_key.html │ ├── dot_notation_with_dash.html │ ├── dot_notation_with_double_quotes.html │ ├── dot_notation_with_double_quotes_after_recursive_descent.html │ ├── dot_notation_with_empty_path.html │ ├── dot_notation_with_key_named_in.html │ ├── dot_notation_with_key_named_length.html │ ├── dot_notation_with_key_named_length_on_array.html │ ├── dot_notation_with_key_named_null.html │ ├── dot_notation_with_key_named_true.html │ ├── dot_notation_with_key_root_literal.html │ ├── dot_notation_with_non_ASCII_key.html │ ├── dot_notation_with_number.html │ ├── dot_notation_with_number_-1.html │ ├── dot_notation_with_number_on_object.html │ ├── dot_notation_with_single_quotes.html │ ├── dot_notation_with_single_quotes_after_recursive_descent.html │ ├── dot_notation_with_single_quotes_and_dot.html │ ├── dot_notation_with_space_padded_key.html │ ├── dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard.html │ ├── dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays.html │ ├── dot_notation_with_wildcard_after_recursive_descent.html │ ├── dot_notation_with_wildcard_after_recursive_descent_on_null_value_array.html │ ├── dot_notation_with_wildcard_after_recursive_descent_on_scalar.html │ ├── dot_notation_with_wildcard_on_array.html │ ├── dot_notation_with_wildcard_on_empty_array.html │ ├── dot_notation_with_wildcard_on_empty_object.html │ ├── dot_notation_with_wildcard_on_object.html │ ├── dot_notation_without_dot.html │ ├── dot_notation_without_root.html │ ├── dot_notation_without_root_and_dot.html │ ├── empty.html │ ├── filter_expression_after_dot_notation_with_wildcard_after_recursive_descent.html │ ├── filter_expression_after_recursive_descent.html │ ├── filter_expression_on_object.html │ ├── filter_expression_with_addition.html │ ├── filter_expression_with_boolean_and_operator.html │ ├── filter_expression_with_boolean_and_operator_and_value_false.html │ ├── filter_expression_with_boolean_and_operator_and_value_true.html │ ├── filter_expression_with_boolean_or_operator.html │ ├── filter_expression_with_boolean_or_operator_and_value_false.html │ ├── filter_expression_with_boolean_or_operator_and_value_true.html │ ├── filter_expression_with_bracket_notation.html │ ├── filter_expression_with_bracket_notation_and_current_object_literal.html │ ├── filter_expression_with_bracket_notation_with_-1.html │ ├── filter_expression_with_bracket_notation_with_number.html │ ├── filter_expression_with_bracket_notation_with_number_on_object.html │ ├── filter_expression_with_current_object.html │ ├── filter_expression_with_different_grouped_operators.html │ ├── filter_expression_with_different_ungrouped_operators.html │ ├── filter_expression_with_division.html │ ├── filter_expression_with_dot_notation_with_dash.html │ ├── filter_expression_with_dot_notation_with_number.html │ ├── filter_expression_with_dot_notation_with_number_on_array.html │ ├── filter_expression_with_empty_expression.html │ ├── filter_expression_with_equals.html │ ├── filter_expression_with_equals_array.html │ ├── filter_expression_with_equals_array_for_array_slice_with_range_1.html │ ├── filter_expression_with_equals_array_for_dot_notation_with_star.html │ ├── filter_expression_with_equals_array_or_equals_true.html │ ├── filter_expression_with_equals_array_with_single_quotes.html │ ├── filter_expression_with_equals_boolean_expression_value.html │ ├── filter_expression_with_equals_false.html │ ├── filter_expression_with_equals_null.html │ ├── filter_expression_with_equals_number_for_array_slice_with_range_1.html │ ├── filter_expression_with_equals_number_for_bracket_notation_with_star.html │ ├── filter_expression_with_equals_number_for_dot_notation_with_star.html │ ├── filter_expression_with_equals_number_with_fraction.html │ ├── filter_expression_with_equals_number_with_leading_zeros.html │ ├── filter_expression_with_equals_object.html │ ├── filter_expression_with_equals_on_array_of_numbers.html │ ├── filter_expression_with_equals_on_array_without_match.html │ ├── filter_expression_with_equals_on_object.html │ ├── filter_expression_with_equals_on_object_with_key_matching_query.html │ ├── filter_expression_with_equals_string.html │ ├── filter_expression_with_equals_string_in_NFC.html │ ├── filter_expression_with_equals_string_with_current_object_literal.html │ ├── filter_expression_with_equals_string_with_dot_literal.html │ ├── filter_expression_with_equals_string_with_single_quotes.html │ ├── filter_expression_with_equals_string_with_unicode_character_escape.html │ ├── filter_expression_with_equals_true.html │ ├── filter_expression_with_equals_with_path_and_path.html │ ├── filter_expression_with_equals_with_root_reference.html │ ├── filter_expression_with_greater_than.html │ ├── filter_expression_with_greater_than_or_equal.html │ ├── filter_expression_with_greater_than_string.html │ ├── filter_expression_with_in_array_of_values.html │ ├── filter_expression_with_in_current_object.html │ ├── filter_expression_with_length_free_function.html │ ├── filter_expression_with_length_function.html │ ├── filter_expression_with_length_property.html │ ├── filter_expression_with_less_than.html │ ├── filter_expression_with_less_than_or_equal.html │ ├── filter_expression_with_local_dot_key_and_null_in_data.html │ ├── filter_expression_with_multiplication.html │ ├── filter_expression_with_negation_and_equals.html │ ├── filter_expression_with_negation_and_equals_array_or_equals_true.html │ ├── filter_expression_with_negation_and_less_than.html │ ├── filter_expression_with_negation_and_without_value.html │ ├── filter_expression_with_non_singular_existence_test.html │ ├── filter_expression_with_not_equals.html │ ├── filter_expression_with_not_equals_array_or_equals_true.html │ ├── filter_expression_with_parent_axis_operator.html │ ├── filter_expression_with_regular_expression.html │ ├── filter_expression_with_regular_expression_from_member.html │ ├── filter_expression_with_set_wise_comparison_to_scalar.html │ ├── filter_expression_with_set_wise_comparison_to_set.html │ ├── filter_expression_with_single_equal.html │ ├── filter_expression_with_subfilter.html │ ├── filter_expression_with_subpaths.html │ ├── filter_expression_with_subpaths_deeply_nested.html │ ├── filter_expression_with_subtraction.html │ ├── filter_expression_with_tautological_comparison.html │ ├── filter_expression_with_triple_equal.html │ ├── filter_expression_with_value.html │ ├── filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects.html │ ├── filter_expression_with_value_after_recursive_descent.html │ ├── filter_expression_with_value_false.html │ ├── filter_expression_with_value_from_recursive_descent.html │ ├── filter_expression_with_value_null.html │ ├── filter_expression_with_value_true.html │ ├── filter_expression_without_parens.html │ ├── filter_expression_without_value.html │ ├── function_sum.html │ ├── parens_notation.html │ ├── recursive_descent.html │ ├── recursive_descent_after_dot_notation.html │ ├── recursive_descent_on_nested_arrays.html │ ├── root.html │ ├── root_on_scalar.html │ ├── root_on_scalar_false.html │ ├── root_on_scalar_true.html │ ├── script_expression.html │ ├── union.html │ ├── union_with_duplication_from_array.html │ ├── union_with_duplication_from_object.html │ ├── union_with_filter.html │ ├── union_with_keys.html │ ├── union_with_keys_after_array_slice.html │ ├── union_with_keys_after_bracket_notation.html │ ├── union_with_keys_after_dot_notation_with_wildcard.html │ ├── union_with_keys_after_recursive_descent.html │ ├── union_with_keys_on_object_without_key.html │ ├── union_with_numbers_in_decreasing_order.html │ ├── union_with_repeated_matches_after_dot_notation_with_wildcard.html │ ├── union_with_slice_and_number.html │ ├── union_with_spaces.html │ └── union_with_wildcard_and_number.html ├── implementations ├── Bash_JSONPath.sh │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── ensure_deps.sh │ ├── install.sh │ ├── run.sh │ ├── tag │ └── upgrade.sh ├── C_json-glib │ ├── LINK │ ├── build.ninja │ ├── main.c │ └── run.sh ├── Clojure_json-path │ ├── LINK │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── lein │ ├── project.clj │ ├── run.sh │ ├── src │ │ └── json_path_comparison │ │ │ └── core.clj │ └── upgrade.sh ├── Cpp_jsoncons │ ├── LINK │ ├── build.ninja │ ├── install.sh │ ├── main.cpp │ ├── run.sh │ ├── tag │ └── upgrade.sh ├── Dart_json_path │ ├── .gitignore │ ├── LINK │ ├── bin │ │ └── Dart_json_path.dart │ ├── build.ninja │ ├── lib │ │ └── Dart_json_path.dart │ ├── pubspec.lock │ ├── pubspec.yaml │ ├── run.sh │ └── upgrade.sh ├── Elixir_ExJsonPath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── lib │ │ └── cli.ex │ ├── mix.exs │ ├── mix.lock │ ├── run.sh │ └── upgrade.sh ├── Elixir_jaxon │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── lib │ │ └── jsonpath.ex │ ├── mix.exs │ ├── mix.lock │ ├── run.sh │ └── upgrade.sh ├── Elixir_warpath │ ├── .gitignore │ ├── LINK │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── lib │ │ └── cli.ex │ ├── mix.exs │ ├── mix.lock │ ├── run.sh │ └── upgrade.sh ├── Erlang_ejsonpath │ ├── LINK │ ├── build.ninja │ ├── rebar.config │ ├── rebar.lock │ ├── run.sh │ ├── src │ │ ├── jsonpath.app.src │ │ └── jsonpath.erl │ └── upgrade.sh ├── Golang_github.com-PaesslerAG-jsonpath │ ├── LINK │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Golang_github.com-bhmj-jsonslice │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Golang_github.com-ohler55-ojg │ ├── LINK │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Golang_github.com-oliveagle-jsonpath │ ├── LINK │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Golang_github.com-spyzhov-ajson │ ├── LINK │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Golang_github.com-vmware-labs-yaml-jsonpath │ ├── LINK │ ├── build.ninja │ ├── go.mod │ ├── go.sum │ ├── internal │ │ └── wrapper │ │ │ ├── find.go │ │ │ └── find_test.go │ ├── main.go │ ├── run.sh │ └── upgrade.sh ├── Haskell_jsonpath │ ├── .gitignore │ ├── LINK │ ├── app │ │ └── Main.hs │ ├── build.ninja │ ├── cabal.project │ ├── install.sh │ ├── json-path-comparison.cabal │ └── run.sh ├── JavaScript_Goessner │ ├── .gitignore │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR │ ├── build.ninja │ ├── index.js │ ├── install.sh │ └── run.sh ├── JavaScript_brunerd │ ├── LINK │ ├── build.ninja │ ├── index.js │ ├── install.sh │ ├── run.sh │ ├── tag │ └── upgrade.sh ├── JavaScript_json-p3 │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── run.sh │ └── upgrade.sh ├── JavaScript_jsonpath-plus │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── run.sh │ └── upgrade.sh ├── JavaScript_jsonpath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── run.sh │ └── upgrade.sh ├── JavaScript_jsonpathly │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── run.sh │ └── upgrade.sh ├── Java_com.github.jsurfer │ ├── LINK │ ├── build.ninja │ ├── pom.xml │ ├── run.sh │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── query │ │ │ └── App.java │ └── upgrade.sh ├── Java_com.jayway.jsonpath │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── pom.xml │ ├── run.sh │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── query │ │ │ └── App.java │ └── upgrade.sh ├── Kotlin_com.nfeld.jsonpathkt │ ├── LINK │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── pom.xml │ ├── run.sh │ ├── src │ │ └── main │ │ │ └── kotlin │ │ │ └── query │ │ │ └── App.kt │ └── upgrade.sh ├── Objective-C_SMJJSONPath │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR │ ├── SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR │ ├── build.ninja │ ├── compile.sh │ ├── install.sh │ ├── main.m │ ├── run.sh │ ├── tag │ └── upgrade.sh ├── PHP_Goessner │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR │ ├── build.ninja │ ├── install.sh │ ├── main.php │ └── run.sh ├── PHP_galbar-jsonpath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── composer.json │ ├── composer.lock │ ├── main.php │ ├── run.sh │ └── upgrade.sh ├── PHP_remorhaz-jsonpath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── composer.json │ ├── composer.lock │ ├── main.php │ ├── run.sh │ └── upgrade.sh ├── PHP_softcreatr-jsonpath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── composer.json │ ├── composer.lock │ ├── main.php │ ├── run.sh │ └── upgrade.sh ├── Perl_JSON-Path │ ├── LINK │ ├── build.ninja │ ├── cpanm.sh │ ├── install.sh │ ├── main.pl │ ├── run.sh │ ├── upgrade.sh │ └── version ├── Python_jsonpath-ng │ ├── LINK │ ├── build.ninja │ ├── main.py │ ├── requirements.txt │ ├── run.sh │ └── upgrade.sh ├── Python_jsonpath-rw │ ├── LINK │ ├── build.ninja │ ├── main.py │ ├── requirements.txt │ ├── run.sh │ └── upgrade.sh ├── Python_jsonpath │ ├── LINK │ ├── NOT_FOUND_RETURNED_AS_ERROR │ ├── build.ninja │ ├── main.py │ ├── requirements.txt │ ├── run.sh │ └── upgrade.sh ├── Python_jsonpath2 │ ├── LINK │ ├── build.ninja │ ├── main.py │ ├── requirements.txt │ ├── run.sh │ └── upgrade.sh ├── Python_python-jsonpath │ ├── LINK │ ├── build.ninja │ ├── main.py │ ├── requirements.txt │ ├── run.sh │ └── upgrade.sh ├── Raku_JSON-Path │ ├── LINK │ ├── build.ninja │ ├── main.p6 │ └── run.sh ├── Ruby_jsonpath │ ├── .gitignore │ ├── LINK │ ├── build.ninja │ ├── install.sh │ ├── main.rb │ ├── run.sh │ ├── tag │ └── upgrade.sh ├── Rust_jsonpath │ ├── Cargo.lock │ ├── Cargo.toml │ ├── LINK │ ├── build.ninja │ ├── run.sh │ ├── src │ │ └── main.rs │ └── upgrade.sh ├── Rust_jsonpath_lib │ ├── Cargo.lock │ ├── Cargo.toml │ ├── LINK │ ├── build.ninja │ ├── run.sh │ ├── src │ │ └── main.rs │ └── upgrade.sh ├── Rust_jsonpath_plus │ ├── Cargo.lock │ ├── Cargo.toml │ ├── LINK │ ├── build.ninja │ ├── run.sh │ ├── src │ │ └── main.rs │ └── upgrade.sh ├── Rust_serde_json_path │ ├── Cargo.lock │ ├── Cargo.toml │ ├── LINK │ ├── build.ninja │ ├── run.sh │ ├── src │ │ └── main.rs │ └── upgrade.sh ├── Scala_jsonpath │ ├── LINK │ ├── build.ninja │ ├── pom.xml │ ├── run.sh │ └── src │ │ └── main │ │ └── scala │ │ └── query │ │ └── App.scala ├── Swift_Sextant │ ├── .gitignore │ ├── LINK │ ├── Package.resolved │ ├── Package.swift │ ├── Sources │ │ └── Swift_Sextant │ │ │ └── main.swift │ ├── build.ninja │ ├── run.sh │ └── upgrade.sh ├── dotNET_Json.NET │ ├── .gitignore │ ├── Dotnet_Json.NET.csproj │ ├── LINK │ ├── Program.cs │ ├── build.ninja │ ├── install.sh │ ├── run.sh │ └── upgrade.sh ├── dotNET_JsonCons.JsonPath │ ├── .gitignore │ ├── Dotnet_JsonCons.JsonPath.csproj │ ├── LINK │ ├── Program.cs │ ├── build.ninja │ ├── install.sh │ ├── run.sh │ └── upgrade.sh ├── dotNET_JsonPath.Net │ ├── .gitignore │ ├── Dotnet_JsonPath.Net.csproj │ ├── LINK │ ├── Program.cs │ ├── build.ninja │ ├── install.sh │ ├── run.sh │ └── upgrade.sh ├── dotNET_JsonPathLib │ ├── .gitignore │ ├── Dotnet_JsonPathLib.csproj │ ├── JsonNetValueSystem.cs │ ├── LINK │ ├── Program.cs │ ├── build.ninja │ ├── install.sh │ ├── nuget.config │ ├── run.sh │ └── upgrade.sh └── dotNET_Manatee.Json │ ├── .gitignore │ ├── Dotnet_Manatee.Json.csproj │ ├── LINK │ ├── Program.cs │ ├── build.ninja │ ├── install.sh │ ├── run.sh │ └── upgrade.sh ├── queries ├── RENAMED_QUERIES ├── array_slice │ ├── document.json │ └── selector ├── array_slice_on_exact_match │ ├── document.json │ └── selector ├── array_slice_on_non_overlapping_array │ ├── document.json │ └── selector ├── array_slice_on_object │ ├── document.json │ └── selector ├── array_slice_on_partially_overlapping_array │ ├── document.json │ └── selector ├── array_slice_with_large_number_for_end │ ├── document.json │ └── selector ├── array_slice_with_large_number_for_end_and_negative_step │ ├── document.json │ └── selector ├── array_slice_with_large_number_for_start │ ├── document.json │ └── selector ├── array_slice_with_large_number_for_start_end_negative_step │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_end_and_range_of_-1 │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_end_and_range_of_0 │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_end_and_range_of_1 │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_positive_end_and_range_of_-1 │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_positive_end_and_range_of_0 │ ├── document.json │ └── selector ├── array_slice_with_negative_start_and_positive_end_and_range_of_1 │ ├── document.json │ └── selector ├── array_slice_with_negative_step │ ├── document.json │ └── selector ├── array_slice_with_negative_step_and_start_greater_than_end │ ├── document.json │ └── selector ├── array_slice_with_negative_step_on_partially_overlapping_array │ ├── document.json │ └── selector ├── array_slice_with_negative_step_only │ ├── document.json │ └── selector ├── array_slice_with_open_end │ ├── document.json │ └── selector ├── array_slice_with_open_end_and_negative_step │ ├── document.json │ └── selector ├── array_slice_with_open_start │ ├── document.json │ └── selector ├── array_slice_with_open_start_and_end │ ├── document.json │ └── selector ├── array_slice_with_open_start_and_end_and_step_empty │ ├── document.json │ └── selector ├── array_slice_with_open_start_and_end_on_object │ ├── document.json │ └── selector ├── array_slice_with_open_start_and_negative_step │ ├── document.json │ └── selector ├── array_slice_with_positive_start_and_negative_end_and_range_of_-1 │ ├── document.json │ └── selector ├── array_slice_with_positive_start_and_negative_end_and_range_of_0 │ ├── document.json │ └── selector ├── array_slice_with_positive_start_and_negative_end_and_range_of_1 │ ├── document.json │ └── selector ├── array_slice_with_range_of_-1 │ ├── document.json │ └── selector ├── array_slice_with_range_of_0 │ ├── document.json │ └── selector ├── array_slice_with_range_of_1 │ ├── document.json │ └── selector ├── array_slice_with_start_-1_and_open_end │ ├── document.json │ └── selector ├── array_slice_with_start_-2_and_open_end │ ├── document.json │ └── selector ├── array_slice_with_start_large_negative_number_and_open_end_on_short_array │ ├── document.json │ └── selector ├── array_slice_with_step │ ├── document.json │ └── selector ├── array_slice_with_step_0 │ ├── document.json │ └── selector ├── array_slice_with_step_1 │ ├── document.json │ └── selector ├── array_slice_with_step_and_leading_zeros │ ├── document.json │ └── selector ├── array_slice_with_step_but_end_not_aligned │ ├── document.json │ └── selector ├── array_slice_with_step_empty │ ├── document.json │ └── selector ├── array_slice_with_step_only │ ├── document.json │ └── selector ├── bracket_notation │ ├── document.json │ └── selector ├── bracket_notation_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── bracket_notation_on_object_without_key │ ├── document.json │ └── selector ├── bracket_notation_with_NFC_path_on_NFD_key │ ├── document.json │ └── selector ├── bracket_notation_with_dot │ ├── document.json │ └── selector ├── bracket_notation_with_double_quotes │ ├── document.json │ └── selector ├── bracket_notation_with_empty_path │ ├── document.json │ └── selector ├── bracket_notation_with_empty_string │ ├── document.json │ └── selector ├── bracket_notation_with_empty_string_doubled_quoted │ ├── document.json │ └── selector ├── bracket_notation_with_negative_number_on_short_array │ ├── document.json │ └── selector ├── bracket_notation_with_number │ ├── document.json │ └── selector ├── bracket_notation_with_number_-1 │ ├── document.json │ └── selector ├── bracket_notation_with_number_-1_on_empty_array │ ├── document.json │ └── selector ├── bracket_notation_with_number_0 │ ├── document.json │ └── selector ├── bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length │ ├── document.json │ └── selector ├── bracket_notation_with_number_on_object │ ├── document.json │ └── selector ├── bracket_notation_with_number_on_short_array │ ├── document.json │ └── selector ├── bracket_notation_with_number_on_string │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_array_slice_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_closing_bracket_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_current_object_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_dot_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_dot_wildcard │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_double_quote_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_escaped_backslash │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_escaped_single_quote │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_number_on_object │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_root_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_special_characters_combined │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_string_and_unescaped_single_quote │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_union_literal │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_wildcard_literal │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── bracket_notation_with_quoted_wildcard_literal_on_object_without_key │ ├── document.json │ └── selector ├── bracket_notation_with_spaces │ ├── document.json │ └── selector ├── bracket_notation_with_string_including_dot_wildcard │ ├── document.json │ └── selector ├── bracket_notation_with_two_literals_separated_by_dot │ ├── document.json │ └── selector ├── bracket_notation_with_two_literals_separated_by_dot_without_quotes │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_after_array_slice │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_on_array │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_on_empty_array │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_on_empty_object │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_on_null_value_array │ ├── document.json │ └── selector ├── bracket_notation_with_wildcard_on_object │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── bracket_notation_without_quotes │ ├── document.json │ └── selector ├── current_with_dot_notation │ ├── document.json │ └── selector ├── dot_bracket_notation │ ├── document.json │ └── selector ├── dot_bracket_notation_with_double_quotes │ ├── document.json │ └── selector ├── dot_bracket_notation_without_quotes │ ├── document.json │ └── selector ├── dot_notation │ ├── document.json │ └── selector ├── dot_notation_after_array_slice │ ├── document.json │ └── selector ├── dot_notation_after_bracket_notation_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_after_bracket_notation_with_wildcard │ ├── document.json │ └── selector ├── dot_notation_after_bracket_notation_with_wildcard_on_one_matching │ ├── document.json │ └── selector ├── dot_notation_after_bracket_notation_with_wildcard_on_some_matching │ ├── document.json │ └── selector ├── dot_notation_after_filter_expression │ ├── document.json │ └── selector ├── dot_notation_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_after_recursive_descent_after_dot_notation │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_after_recursive_descent_with_extra_dot │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_after_union │ ├── document.json │ └── selector ├── dot_notation_after_union_with_keys │ ├── document.json │ └── selector ├── dot_notation_on_array │ ├── document.json │ └── selector ├── dot_notation_on_array_value │ ├── document.json │ └── selector ├── dot_notation_on_array_with_containing_object_matching_key │ ├── document.json │ └── selector ├── dot_notation_on_empty_object_value │ ├── document.json │ └── selector ├── dot_notation_on_null_value │ ├── document.json │ └── selector ├── dot_notation_on_object_without_key │ ├── document.json │ └── selector ├── dot_notation_with_dash │ ├── document.json │ └── selector ├── dot_notation_with_double_quotes │ ├── document.json │ └── selector ├── dot_notation_with_double_quotes_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_with_empty_path │ ├── document.json │ └── selector ├── dot_notation_with_key_named_in │ ├── document.json │ └── selector ├── dot_notation_with_key_named_length │ ├── document.json │ └── selector ├── dot_notation_with_key_named_length_on_array │ ├── document.json │ └── selector ├── dot_notation_with_key_named_null │ ├── document.json │ └── selector ├── dot_notation_with_key_named_true │ ├── document.json │ └── selector ├── dot_notation_with_key_root_literal │ ├── document.json │ └── selector ├── dot_notation_with_non_ASCII_key │ ├── document.json │ └── selector ├── dot_notation_with_number │ ├── document.json │ └── selector ├── dot_notation_with_number_-1 │ ├── document.json │ └── selector ├── dot_notation_with_number_on_object │ ├── document.json │ └── selector ├── dot_notation_with_single_quotes │ ├── document.json │ └── selector ├── dot_notation_with_single_quotes_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_with_single_quotes_and_dot │ ├── document.json │ └── selector ├── dot_notation_with_space_padded_key │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_after_recursive_descent_on_null_value_array │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_after_recursive_descent_on_scalar │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_on_array │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_on_empty_array │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_on_empty_object │ ├── document.json │ └── selector ├── dot_notation_with_wildcard_on_object │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── dot_notation_without_dot │ ├── document.json │ └── selector ├── dot_notation_without_root │ ├── document.json │ └── selector ├── dot_notation_without_root_and_dot │ ├── document.json │ └── selector ├── empty │ ├── document.json │ └── selector ├── filter_expression_after_dot_notation_with_wildcard_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── filter_expression_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── filter_expression_on_object │ ├── document.json │ └── selector ├── filter_expression_with_addition │ ├── document.json │ └── selector ├── filter_expression_with_boolean_and_operator │ ├── document.json │ └── selector ├── filter_expression_with_boolean_and_operator_and_value_false │ ├── document.json │ └── selector ├── filter_expression_with_boolean_and_operator_and_value_true │ ├── document.json │ └── selector ├── filter_expression_with_boolean_or_operator │ ├── document.json │ └── selector ├── filter_expression_with_boolean_or_operator_and_value_false │ ├── document.json │ └── selector ├── filter_expression_with_boolean_or_operator_and_value_true │ ├── document.json │ └── selector ├── filter_expression_with_bracket_notation │ ├── document.json │ └── selector ├── filter_expression_with_bracket_notation_and_current_object_literal │ ├── document.json │ └── selector ├── filter_expression_with_bracket_notation_with_-1 │ ├── document.json │ └── selector ├── filter_expression_with_bracket_notation_with_number │ ├── document.json │ └── selector ├── filter_expression_with_bracket_notation_with_number_on_object │ ├── document.json │ └── selector ├── filter_expression_with_current_object │ ├── document.json │ └── selector ├── filter_expression_with_different_grouped_operators │ ├── document.json │ └── selector ├── filter_expression_with_different_ungrouped_operators │ ├── document.json │ └── selector ├── filter_expression_with_division │ ├── document.json │ └── selector ├── filter_expression_with_dot_notation_with_dash │ ├── document.json │ └── selector ├── filter_expression_with_dot_notation_with_number │ ├── document.json │ └── selector ├── filter_expression_with_dot_notation_with_number_on_array │ ├── document.json │ └── selector ├── filter_expression_with_empty_expression │ ├── document.json │ └── selector ├── filter_expression_with_equals │ ├── document.json │ └── selector ├── filter_expression_with_equals_array │ ├── document.json │ └── selector ├── filter_expression_with_equals_array_for_array_slice_with_range_1 │ ├── document.json │ └── selector ├── filter_expression_with_equals_array_for_dot_notation_with_star │ ├── document.json │ └── selector ├── filter_expression_with_equals_array_or_equals_true │ ├── document.json │ └── selector ├── filter_expression_with_equals_array_with_single_quotes │ ├── document.json │ └── selector ├── filter_expression_with_equals_boolean_expression_value │ ├── document.json │ └── selector ├── filter_expression_with_equals_false │ ├── document.json │ └── selector ├── filter_expression_with_equals_null │ ├── document.json │ └── selector ├── filter_expression_with_equals_number_for_array_slice_with_range_1 │ ├── document.json │ └── selector ├── filter_expression_with_equals_number_for_bracket_notation_with_star │ ├── document.json │ └── selector ├── filter_expression_with_equals_number_for_dot_notation_with_star │ ├── document.json │ └── selector ├── filter_expression_with_equals_number_with_fraction │ ├── document.json │ └── selector ├── filter_expression_with_equals_number_with_leading_zeros │ ├── document.json │ └── selector ├── filter_expression_with_equals_object │ ├── document.json │ └── selector ├── filter_expression_with_equals_on_array_of_numbers │ ├── document.json │ └── selector ├── filter_expression_with_equals_on_array_without_match │ ├── document.json │ └── selector ├── filter_expression_with_equals_on_object │ ├── document.json │ └── selector ├── filter_expression_with_equals_on_object_with_key_matching_query │ ├── document.json │ └── selector ├── filter_expression_with_equals_string │ ├── document.json │ └── selector ├── filter_expression_with_equals_string_in_NFC │ ├── document.json │ └── selector ├── filter_expression_with_equals_string_with_current_object_literal │ ├── document.json │ └── selector ├── filter_expression_with_equals_string_with_dot_literal │ ├── document.json │ └── selector ├── filter_expression_with_equals_string_with_single_quotes │ ├── document.json │ └── selector ├── filter_expression_with_equals_string_with_unicode_character_escape │ ├── document.json │ └── selector ├── filter_expression_with_equals_true │ ├── document.json │ └── selector ├── filter_expression_with_equals_with_path_and_path │ ├── document.json │ └── selector ├── filter_expression_with_equals_with_root_reference │ ├── document.json │ └── selector ├── filter_expression_with_greater_than │ ├── document.json │ └── selector ├── filter_expression_with_greater_than_or_equal │ ├── document.json │ └── selector ├── filter_expression_with_greater_than_string │ ├── document.json │ └── selector ├── filter_expression_with_in_array_of_values │ ├── document.json │ └── selector ├── filter_expression_with_in_current_object │ ├── document.json │ └── selector ├── filter_expression_with_length_free_function │ ├── document.json │ └── selector ├── filter_expression_with_length_function │ ├── document.json │ └── selector ├── filter_expression_with_length_property │ ├── document.json │ └── selector ├── filter_expression_with_less_than │ ├── document.json │ └── selector ├── filter_expression_with_less_than_or_equal │ ├── document.json │ └── selector ├── filter_expression_with_local_dot_key_and_null_in_data │ ├── document.json │ └── selector ├── filter_expression_with_multiplication │ ├── document.json │ └── selector ├── filter_expression_with_negation_and_equals │ ├── document.json │ └── selector ├── filter_expression_with_negation_and_equals_array_or_equals_true │ ├── document.json │ └── selector ├── filter_expression_with_negation_and_less_than │ ├── document.json │ └── selector ├── filter_expression_with_negation_and_without_value │ ├── document.json │ └── selector ├── filter_expression_with_non_singular_existence_test │ ├── document.json │ └── selector ├── filter_expression_with_not_equals │ ├── document.json │ └── selector ├── filter_expression_with_not_equals_array_or_equals_true │ ├── document.json │ └── selector ├── filter_expression_with_parent_axis_operator │ ├── document.json │ └── selector ├── filter_expression_with_regular_expression │ ├── document.json │ └── selector ├── filter_expression_with_regular_expression_from_member │ ├── document.json │ └── selector ├── filter_expression_with_set_wise_comparison_to_scalar │ ├── document.json │ └── selector ├── filter_expression_with_set_wise_comparison_to_set │ ├── document.json │ └── selector ├── filter_expression_with_single_equal │ ├── document.json │ └── selector ├── filter_expression_with_subfilter │ ├── document.json │ └── selector ├── filter_expression_with_subpaths │ ├── document.json │ └── selector ├── filter_expression_with_subpaths_deeply_nested │ ├── document.json │ └── selector ├── filter_expression_with_subtraction │ ├── document.json │ └── selector ├── filter_expression_with_tautological_comparison │ ├── document.json │ └── selector ├── filter_expression_with_triple_equal │ ├── document.json │ └── selector ├── filter_expression_with_value │ ├── document.json │ └── selector ├── filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects │ ├── document.json │ └── selector ├── filter_expression_with_value_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── filter_expression_with_value_false │ ├── document.json │ └── selector ├── filter_expression_with_value_from_recursive_descent │ ├── document.json │ └── selector ├── filter_expression_with_value_null │ ├── document.json │ └── selector ├── filter_expression_with_value_true │ ├── document.json │ └── selector ├── filter_expression_without_parens │ ├── document.json │ └── selector ├── filter_expression_without_value │ ├── document.json │ └── selector ├── function_sum │ ├── document.json │ └── selector ├── parens_notation │ ├── document.json │ └── selector ├── recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── recursive_descent_after_dot_notation │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── recursive_descent_on_nested_arrays │ ├── document.json │ └── selector ├── root │ ├── document.json │ └── selector ├── root_on_scalar │ ├── document.json │ └── selector ├── root_on_scalar_false │ ├── document.json │ └── selector ├── root_on_scalar_true │ ├── document.json │ └── selector ├── script_expression │ ├── document.json │ └── selector ├── union │ ├── document.json │ └── selector ├── union_with_duplication_from_array │ ├── document.json │ └── selector ├── union_with_duplication_from_object │ ├── document.json │ └── selector ├── union_with_filter │ ├── document.json │ └── selector ├── union_with_keys │ ├── document.json │ └── selector ├── union_with_keys_after_array_slice │ ├── document.json │ └── selector ├── union_with_keys_after_bracket_notation │ ├── document.json │ └── selector ├── union_with_keys_after_dot_notation_with_wildcard │ ├── document.json │ └── selector ├── union_with_keys_after_recursive_descent │ ├── ALLOW_UNORDERED │ ├── document.json │ └── selector ├── union_with_keys_on_object_without_key │ ├── document.json │ └── selector ├── union_with_numbers_in_decreasing_order │ ├── document.json │ └── selector ├── union_with_repeated_matches_after_dot_notation_with_wildcard │ ├── document.json │ └── selector ├── union_with_slice_and_number │ ├── document.json │ └── selector ├── union_with_spaces │ ├── document.json │ └── selector └── union_with_wildcard_and_number │ ├── document.json │ └── selector ├── regression_suite ├── Bash_JSONPath.sh.yaml ├── C_json-glib.yaml ├── Clojure_json-path.yaml ├── Cpp_jsoncons.yaml ├── Dart_json_path.yaml ├── Elixir_ExJsonPath.yaml ├── Elixir_jaxon.yaml ├── Elixir_warpath.yaml ├── Erlang_ejsonpath.yaml ├── Golang_github.com-PaesslerAG-jsonpath.yaml ├── Golang_github.com-bhmj-jsonslice.yaml ├── Golang_github.com-ohler55-ojg.yaml ├── Golang_github.com-oliveagle-jsonpath.yaml ├── Golang_github.com-spyzhov-ajson.yaml ├── Golang_github.com-vmware-labs-yaml-jsonpath.yaml ├── Haskell_jsonpath.yaml ├── JavaScript_Goessner.yaml ├── JavaScript_brunerd.yaml ├── JavaScript_json-p3.yaml ├── JavaScript_jsonpath-plus.yaml ├── JavaScript_jsonpath.yaml ├── JavaScript_jsonpathly.yaml ├── Java_com.github.jsurfer.yaml ├── Java_com.jayway.jsonpath.yaml ├── Kotlin_com.nfeld.jsonpathkt.yaml ├── Objective-C_SMJJSONPath.yaml ├── PHP_Goessner.yaml ├── PHP_galbar-jsonpath.yaml ├── PHP_remorhaz-jsonpath.yaml ├── PHP_softcreatr-jsonpath.yaml ├── Perl_JSON-Path.yaml ├── Python_jsonpath-ng.yaml ├── Python_jsonpath-rw.yaml ├── Python_jsonpath.yaml ├── Python_jsonpath2.yaml ├── Python_python-jsonpath.yaml ├── Raku_JSON-Path.yaml ├── Ruby_jsonpath.yaml ├── Rust_jsonpath.yaml ├── Rust_jsonpath_lib.yaml ├── Rust_jsonpath_plus.yaml ├── Rust_serde_json_path.yaml ├── Scala_jsonpath.yaml ├── Swift_Sextant.yaml ├── dotNET_Json.NET.yaml ├── dotNET_JsonCons.JsonPath.yaml ├── dotNET_JsonPath.Net.yaml ├── dotNET_JsonPathLib.yaml ├── dotNET_Manatee.Json.yaml └── regression_suite.yaml └── src ├── Brewfile ├── Dockerfile ├── build_consensus.sh ├── build_implementations_matching_majority.sh ├── build_majority_result.sh ├── canonical_json.py ├── clean.sh ├── compile_bug_reports.sh ├── compile_implementation_report.sh ├── compile_regression_suite.sh ├── compile_results_report.sh ├── compile_table.sh ├── consensus.py ├── docker_env_file.txt ├── generate_ninja.sh ├── installObjectiveC.sh ├── majority_result.py ├── one_off.sh ├── oneliner_json.py ├── pretty_json.py ├── query_implementation.sh ├── shared.sh ├── sort_json_array.py ├── sort_queries.py ├── upgrade.sh ├── with_docker.sh ├── with_native.sh └── wrap_in_docker.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | .ninja_deps 3 | .ninja_log 4 | /implementations/*/build/ 5 | -------------------------------------------------------------------------------- /bug_reports/Haskell_jsonpath.md: -------------------------------------------------------------------------------- 1 | Results do not match other implementations 2 | 3 | The following queries provide results that do not match those of other implementations of JSONPath 4 | (compare https://cburgmer.github.io/json-path-comparison/): 5 | 6 | -------------------------------------------------------------------------------- /comparison/README.md: -------------------------------------------------------------------------------- 1 | The page has moved to https://cburgmer.github.io/json-path-comparison/. 2 | -------------------------------------------------------------------------------- /implementations/Bash_JSONPath.sh/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | -------------------------------------------------------------------------------- /implementations/Bash_JSONPath.sh/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/mclarkson/JSONPath.sh 2 | -------------------------------------------------------------------------------- /implementations/Bash_JSONPath.sh/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Bash_JSONPath.sh 2 | builddir = $root/build 3 | 4 | rule install 5 | command = rm -rf $out && $root/install.sh $out 6 | 7 | build $builddir/JSONPath.sh: install | $root/install.sh $root/tag 8 | 9 | build $root/install: phony $builddir/JSONPath.sh 10 | -------------------------------------------------------------------------------- /implementations/Bash_JSONPath.sh/tag: -------------------------------------------------------------------------------- 1 | v0.0.21 2 | -------------------------------------------------------------------------------- /implementations/Bash_JSONPath.sh/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | curl 'https://api.github.com/repos/bashtools/JSONPath.sh/releases' | grep '"tag_name":' | head -1 | sed 's/.*"tag_name": "\(.*\)",.*/\1/' > tag 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/C_json-glib/LINK: -------------------------------------------------------------------------------- 1 | https://gitlab.gnome.org/GNOME/json-glib 2 | -------------------------------------------------------------------------------- /implementations/C_json-glib/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/C_json-glib 2 | builddir = $root/build 3 | 4 | rule build 5 | command = mkdir -p $$(dirname $out) && gcc `pkg-config --cflags glib-2.0 json-glib-1.0 gio-unix-2.0` $in `pkg-config --libs glib-2.0 json-glib-1.0 gio-unix-2.0` -o $out 6 | 7 | build $builddir/main: build $root/main.c | $root/main.c 8 | 9 | build $root/install: phony $builddir/main 10 | -------------------------------------------------------------------------------- /implementations/C_json-glib/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | # Timeout after some seconds as slices with step seem to go into an endless loop 8 | timeout -v 5 build/main "$@" 9 | -------------------------------------------------------------------------------- /implementations/Clojure_json-path/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/gga/json-path 2 | -------------------------------------------------------------------------------- /implementations/Clojure_json-path/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Clojure_json-path/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Clojure_json-path/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | java -jar "$script_dir"/build/json-path-comparison.jar "$@" 7 | -------------------------------------------------------------------------------- /implementations/Clojure_json-path/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | ./lein ancient upgrade 6 | rm -f ./.lein-failures 7 | rm -rf ./target/ 8 | -------------------------------------------------------------------------------- /implementations/Cpp_jsoncons/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/danielaparker/jsoncons 2 | -------------------------------------------------------------------------------- /implementations/Cpp_jsoncons/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | ./build/main "$@" 8 | -------------------------------------------------------------------------------- /implementations/Cpp_jsoncons/tag: -------------------------------------------------------------------------------- 1 | v1.3.2 2 | -------------------------------------------------------------------------------- /implementations/Cpp_jsoncons/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | curl 'https://api.github.com/repos/danielaparker/jsoncons/releases' | grep '"tag_name":' | head -1 | sed 's/.*"tag_name": "\(.*\)",.*/\1/' > tag 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .packages 4 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/f3ath/jessie 2 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Dart_json_path 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && PUB_CACHE=build/pub-cache dart pub get) > $out 6 | 7 | build $builddir/deps_installed: install | $root/pubspec.yaml $root/pubspec.lock 8 | 9 | build $root/install: phony $builddir/deps_installed 10 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/lib/Dart_json_path.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:json_path/json_path.dart'; 4 | 5 | String select(String selector, String payload) { 6 | final json = jsonDecode(payload); 7 | 8 | return jsonEncode(JsonPath(selector).readValues(json).toList()); 9 | } 10 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: Dart_json_path 2 | description: Dart json_path adapter 3 | 4 | environment: 5 | sdk: '>=3.0.0 <4.0.0' 6 | 7 | dependencies: 8 | json_path: ^0.7.0 9 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | dart run bin/Dart_json_path.dart "$1" 8 | -------------------------------------------------------------------------------- /implementations/Dart_json_path/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dart pub upgrade --major-versions 6 | dart pub upgrade 7 | rm -rf build/ 8 | -------------------------------------------------------------------------------- /implementations/Elixir_ExJsonPath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/ispirata/exjsonpath 2 | -------------------------------------------------------------------------------- /implementations/Elixir_ExJsonPath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Elixir_ExJsonPath 2 | 3 | rule compile 4 | command = (cd $root && mix local.hex --if-missing --force && mix deps.get && mix escript.build && cd - && mv $root/jsonpath $out) 5 | 6 | build $root/build/jsonpath: compile | $root/lib/cli.ex $root/mix.exs $root/mix.lock 7 | 8 | build $root/install: phony $root/build/jsonpath 9 | -------------------------------------------------------------------------------- /implementations/Elixir_ExJsonPath/mix.lock: -------------------------------------------------------------------------------- 1 | %{ 2 | "exjsonpath": {:hex, :exjsonpath, "0.9.0", "87e593eb0deb53aa0688ca9f9edc9fb3456aca83c82245f83201ea04d696feba", [:mix], [], "hexpm", "8d7a8e9ba784e1f7a67c6f1074a3ac91a3a79a45969514ee5d95cea5bf749627"}, 3 | "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, 4 | } 5 | -------------------------------------------------------------------------------- /implementations/Elixir_ExJsonPath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mix deps.update --all 6 | -------------------------------------------------------------------------------- /implementations/Elixir_jaxon/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/boudra/jaxon 2 | -------------------------------------------------------------------------------- /implementations/Elixir_jaxon/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Elixir_jaxon 2 | 3 | rule compile 4 | command = (cd $root && mix local.hex --if-missing --force && mix deps.get && mix compile) 5 | 6 | build $root/build/dev/dev/lib/jsonpath/ebin/jsonpath.app: compile | $root/lib/jsonpath.ex $root/mix.exs $root/mix.lock 7 | 8 | build $root/install: phony $root/build/dev/dev/lib/jsonpath/ebin/jsonpath.app 9 | -------------------------------------------------------------------------------- /implementations/Elixir_jaxon/lib/jsonpath.ex: -------------------------------------------------------------------------------- 1 | defmodule Mix.Tasks.Execute do 2 | use Mix.Task 3 | 4 | def run(args) do 5 | json = IO.read(:stdio, :all) 6 | stream = [json] 7 | selector = hd(args) 8 | result = stream |> Jaxon.Stream.from_enumerable() |> Jaxon.Stream.query(Jaxon.Path.parse!(selector)) |> Enum.to_list() 9 | IO.puts(Poison.encode!(result)) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /implementations/Elixir_jaxon/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mix deps.update --all 6 | -------------------------------------------------------------------------------- /implementations/Elixir_warpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/Cleidiano/warpath/ 2 | -------------------------------------------------------------------------------- /implementations/Elixir_warpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Elixir_warpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Elixir_warpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Elixir_warpath 2 | 3 | rule compile 4 | command = (cd $root && mix local.hex --if-missing --force && mix deps.get && mix escript.build && cd - && mv $root/jsonpath $out) 5 | 6 | build $root/build/jsonpath: compile | $root/lib/cli.ex $root/mix.exs $root/mix.lock 7 | 8 | build $root/install: phony $root/build/jsonpath 9 | -------------------------------------------------------------------------------- /implementations/Elixir_warpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mix deps.update --all 6 | -------------------------------------------------------------------------------- /implementations/Erlang_ejsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/ostrovok-team/ejsonpath 2 | -------------------------------------------------------------------------------- /implementations/Erlang_ejsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Erlang_ejsonpath 2 | builddir = $root/build 3 | 4 | rule compile 5 | command = (cd $root && rebar3 compile) 6 | 7 | build $builddir/default/lib/jsonpath/ebin/jsonpath.beam: compile | $root/src/jsonpath.erl 8 | 9 | build $root/install: phony $builddir/default/lib/jsonpath/ebin/jsonpath.beam 10 | -------------------------------------------------------------------------------- /implementations/Erlang_ejsonpath/rebar.config: -------------------------------------------------------------------------------- 1 | {erl_opts, [debug_info]}. 2 | {deps, [jiffy, ejsonpath]}. 3 | {base_dir, "build"}. 4 | -------------------------------------------------------------------------------- /implementations/Erlang_ejsonpath/src/jsonpath.app.src: -------------------------------------------------------------------------------- 1 | {application, jsonpath, 2 | [{description, "An OTP library"}, 3 | {vsn, "0.1.0"}, 4 | {registered, []}, 5 | {applications, 6 | [kernel, 7 | stdlib 8 | ]}, 9 | {env,[]}, 10 | {modules, []}, 11 | 12 | {licenses, ["Apache 2.0"]}, 13 | {links, []} 14 | ]}. 15 | -------------------------------------------------------------------------------- /implementations/Erlang_ejsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "${script_dir}" 7 | 8 | rebar3 upgrade 9 | # Poor man's dependency handling, work around https://github.com/erlang/rebar3/issues/2220 10 | rm -r ./build/ 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/PaesslerAG/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Golang_github.com-PaesslerAG-jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-PaesslerAG-jsonpath 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/PaesslerAG/gval v1.2.4 // indirect 7 | github.com/PaesslerAG/jsonpath v0.1.1 8 | github.com/shopspring/decimal v1.4.0 // indirect 9 | ) 10 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-PaesslerAG-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/bhmj/jsonslice 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Golang_github.com-bhmj-jsonslice/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Golang_github.com-bhmj-jsonslice/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-bhmj-jsonslice 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/bhmj/jsonslice v1.1.3 7 | github.com/bhmj/xpression v0.9.4 // indirect 8 | ) 9 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-bhmj-jsonslice/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-ohler55-ojg/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/ohler55/ojg 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-ohler55-ojg/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-ohler55-ojg 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-ohler55-ojg/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.22 4 | 5 | require github.com/ohler55/ojg v1.26.5 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-ohler55-ojg/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-ohler55-ojg/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/oliveagle/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Golang_github.com-oliveagle-jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-oliveagle-jsonpath 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.13 4 | 5 | require github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/go.sum: -------------------------------------------------------------------------------- 1 | github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI= 2 | github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4= 3 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-oliveagle-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-spyzhov-ajson/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/spyzhov/ajson 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-spyzhov-ajson/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-spyzhov-ajson 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-spyzhov-ajson/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.13 4 | 5 | require github.com/spyzhov/ajson v0.9.6 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-spyzhov-ajson/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-spyzhov-ajson/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-vmware-labs-yaml-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/vmware-labs/yaml-jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-vmware-labs-yaml-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Golang_github.com-vmware-labs-yaml-jsonpath 2 | builddir = $root/build 3 | 4 | # Hack target directory because golang is bad, again 5 | rule build 6 | command = cd $root && go build -o build/main 7 | 8 | build $builddir/main: build | $root/main.go $root/go.mod $root/go.sum 9 | 10 | build $root/install: phony $builddir/main 11 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-vmware-labs-yaml-jsonpath/go.mod: -------------------------------------------------------------------------------- 1 | module example.com/main 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/dprotaso/go-yit v0.0.0-20240618133044-5a0af90af097 // indirect 7 | github.com/icza/dyno v0.0.0-20200205103839-49cb13720835 8 | github.com/stretchr/testify v1.7.0 9 | github.com/vmware-labs/yaml-jsonpath v0.3.2 10 | gopkg.in/yaml.v2 v2.4.0 // indirect 11 | gopkg.in/yaml.v3 v3.0.1 12 | ) 13 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-vmware-labs-yaml-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | "$script_dir"/build/main "$@" 7 | -------------------------------------------------------------------------------- /implementations/Golang_github.com-vmware-labs-yaml-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | go get -u 6 | -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | dist-newstyle/ 2 | .ghc.environment.* 3 | *~ -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/akshaymankar/jsonpath-hs -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Haskell_jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = $root/install.sh $$(dirname $out) 6 | 7 | build $builddir/json-path-comparison: install | $root/json-path-comparison.cabal $root/app/Main.hs 8 | 9 | build $root/install: phony $builddir/json-path-comparison 10 | -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/cabal.project: -------------------------------------------------------------------------------- 1 | packages: ./json-path-comparison.cabal 2 | -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly target_dir="$1" 5 | 6 | cd "$(dirname "$target_dir")" 7 | 8 | cabal v2-update 9 | cabal v2-install --install-method=copy --installdir="$(basename "$target_dir")" --overwrite-policy=always 10 | -------------------------------------------------------------------------------- /implementations/Haskell_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | # Timeout after some seconds to avoid endless loops 8 | timeout -v 10 ./build/json-path-comparison "$@" 9 | -------------------------------------------------------------------------------- /implementations/JavaScript_Goessner/.gitignore: -------------------------------------------------------------------------------- 1 | /jsonpath.js 2 | /jsonpath_export.js 3 | -------------------------------------------------------------------------------- /implementations/JavaScript_Goessner/LINK: -------------------------------------------------------------------------------- 1 | https://code.google.com/archive/p/jsonpath/ 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_Goessner/NOT_FOUND_RETURNED_AS_ERROR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/JavaScript_Goessner/NOT_FOUND_RETURNED_AS_ERROR -------------------------------------------------------------------------------- /implementations/JavaScript_Goessner/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_Goessner 2 | builddir = $root/build 3 | 4 | rule install 5 | command = $root/install.sh $out 6 | 7 | build $builddir/jsonpath_export.js: install | $root/install.sh 8 | 9 | build $root/install: phony $builddir/jsonpath_export.js 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_brunerd/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/brunerd/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_brunerd/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_brunerd 2 | builddir = $root/build 3 | 4 | rule install 5 | command = $root/install.sh $out 6 | 7 | build $builddir/jsonpath_export.js: install | $root/install.sh 8 | 9 | build $root/install: phony $builddir/jsonpath_export.js 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_brunerd/tag: -------------------------------------------------------------------------------- 1 | v0.9.19 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_brunerd/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | curl 'https://api.github.com/repos/brunerd/jsonpath/releases' | grep '"tag_name":' | head -1 | sed 's/.*"tag_name": "\(.*\)",.*/\1/' > tag 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/JavaScript_json-p3/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_json-p3/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/jg-rp/json-p3 -------------------------------------------------------------------------------- /implementations/JavaScript_json-p3/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_json-p3 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && npm install) && echo > $out 6 | 7 | build $builddir/node_modules_installed: install | $root/package.json $root/package-lock.json 8 | 9 | build $root/install: phony $builddir/node_modules_installed 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_json-p3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "javascript_json-p3", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "json-p3": "^2.2.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /implementations/JavaScript_json-p3/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | npm i json-p3@latest 9 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath-plus/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath-plus/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/s3u/JSONPath 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath-plus/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_jsonpath-plus 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && npm install) && echo > $out 6 | 7 | build $builddir/node_modules_installed: install | $root/package.json $root/package-lock.json 8 | 9 | build $root/install: phony $builddir/node_modules_installed 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath-plus/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "javascript_jsonpath-plus", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "jsonpath-plus": "^10.3.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath-plus/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | npm i jsonpath-plus@latest 9 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/dchester/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && npm install) && echo > $out 6 | 7 | build $builddir/node_modules_installed: install | $root/package.json $root/package-lock.json 8 | 9 | build $root/install: phony $builddir/node_modules_installed 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "javascript_jsonpath", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "jsonpath": "^1.1.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | ./index.js "$@" 9 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | npm i jsonpath@latest 9 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpathly/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpathly/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/atamano/jsonpathly 2 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpathly/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/JavaScript_jsonpathly 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && npm install) && echo > $out 6 | 7 | build $builddir/node_modules_installed: install | $root/package.json $root/package-lock.json 8 | 9 | build $root/install: phony $builddir/node_modules_installed 10 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpathly/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "javascript_jsonpathly", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "jsonpathly": "^2.0.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /implementations/JavaScript_jsonpathly/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | npm i jsonpathly@latest 9 | -------------------------------------------------------------------------------- /implementations/Java_com.github.jsurfer/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/jsurfer/JsonSurfer 2 | -------------------------------------------------------------------------------- /implementations/Java_com.github.jsurfer/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | java -cp "${script_dir}/build/json-path-comparison.jar:$(cat "${script_dir}/build/cp.txt")" query.App "$@" 7 | -------------------------------------------------------------------------------- /implementations/Java_com.github.jsurfer/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mvn versions:use-latest-versions 6 | rm -f pom.xml.versionsBackup 7 | -------------------------------------------------------------------------------- /implementations/Java_com.jayway.jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/json-path/JsonPath/ 2 | -------------------------------------------------------------------------------- /implementations/Java_com.jayway.jsonpath/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Java_com.jayway.jsonpath/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR -------------------------------------------------------------------------------- /implementations/Java_com.jayway.jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Java_com.jayway.jsonpath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Java_com.jayway.jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | java -cp "${script_dir}/build/json-path-comparison.jar:$(cat "${script_dir}/build/cp.txt")" query.App "$@" 7 | -------------------------------------------------------------------------------- /implementations/Java_com.jayway.jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mvn versions:use-latest-versions 6 | rm -f pom.xml.versionsBackup 7 | -------------------------------------------------------------------------------- /implementations/Kotlin_com.nfeld.jsonpathkt/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/codeniko/JsonPathKt 2 | -------------------------------------------------------------------------------- /implementations/Kotlin_com.nfeld.jsonpathkt/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Kotlin_com.nfeld.jsonpathkt/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Kotlin_com.nfeld.jsonpathkt/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | java -cp "${script_dir}/build/json-path-comparison.jar:$(cat "${script_dir}/build/cp.txt")" query.AppKt "$@" 7 | -------------------------------------------------------------------------------- /implementations/Kotlin_com.nfeld.jsonpathkt/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | mvn versions:use-latest-versions 6 | rm -f pom.xml.versionsBackup 7 | -------------------------------------------------------------------------------- /implementations/Objective-C_SMJJSONPath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/javerous/SMJJSONPath 2 | -------------------------------------------------------------------------------- /implementations/Objective-C_SMJJSONPath/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Objective-C_SMJJSONPath/NOT_FOUND_RETURNED_AS_ERROR_FOR_SCALAR -------------------------------------------------------------------------------- /implementations/Objective-C_SMJJSONPath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Objective-C_SMJJSONPath/SINGLE_POSSIBLE_MATCH_RETURNED_AS_SCALAR -------------------------------------------------------------------------------- /implementations/Objective-C_SMJJSONPath/tag: -------------------------------------------------------------------------------- 1 | version-1.0.3 2 | -------------------------------------------------------------------------------- /implementations/Objective-C_SMJJSONPath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | curl 'https://api.github.com/repos/javerous/SMJJSONPath/releases' | grep '"tag_name":' | head -1 | sed 's/.*"tag_name": "\(.*\)",.*/\1/' > tag 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/PHP_Goessner/LINK: -------------------------------------------------------------------------------- 1 | https://code.google.com/archive/p/jsonpath/ 2 | -------------------------------------------------------------------------------- /implementations/PHP_Goessner/NOT_FOUND_RETURNED_AS_ERROR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/PHP_Goessner/NOT_FOUND_RETURNED_AS_ERROR -------------------------------------------------------------------------------- /implementations/PHP_Goessner/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/PHP_Goessner 2 | builddir = $root/build 3 | 4 | rule install 5 | command = $root/install.sh $out 6 | 7 | build $builddir/jsonpath.php: install | $root/install.sh 8 | 9 | build $root/install: phony $builddir/jsonpath.php 10 | -------------------------------------------------------------------------------- /implementations/PHP_Goessner/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | php main.php "$@" 8 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/Galbar/JsonPath-PHP 2 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/PHP_galbar-jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && composer install) && echo > $out 6 | 7 | build $builddir/composer_installed: install | $root/composer.json $root/composer.lock 8 | 9 | build $root/install: phony $builddir/composer_installed 10 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "galbar/jsonpath": "*" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | php main.php "$@" 9 | -------------------------------------------------------------------------------- /implementations/PHP_galbar-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | rm -rf vendor 6 | composer update 7 | -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/remorhaz/php-json-path/ -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/PHP_remorhaz-jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && composer install) && echo > $out 6 | 7 | build $builddir/composer_installed: install | $root/composer.json $root/composer.lock 8 | 9 | build $root/install: phony $builddir/composer_installed 10 | -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "remorhaz/php-json-path": "*" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | php main.php "$@" 9 | -------------------------------------------------------------------------------- /implementations/PHP_remorhaz-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | rm -rf vendor 6 | composer update 7 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/SoftCreatR/JSONPath 2 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/PHP_softcreatr-jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = (cd $root && composer update) && echo > $out 6 | 7 | build $builddir/composer_installed: install | $root/composer.json $root/composer.lock 8 | 9 | build $root/install: phony $builddir/composer_installed 10 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "softcreatr/jsonpath": "*" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | # Timeout after some seconds as some slices with negative step seem to go into an infinite loop 9 | timeout -v 10 php main.php "$@" 10 | -------------------------------------------------------------------------------- /implementations/PHP_softcreatr-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | rm -rf vendor 6 | composer update 7 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/LINK: -------------------------------------------------------------------------------- 1 | https://metacpan.org/pod/JSON::Path 2 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Perl_JSON-Path 2 | builddir = $root/build 3 | 4 | rule install_json_path 5 | command = $root/install.sh $builddir && echo > $out 6 | 7 | build $builddir/json_path_installed: install_json_path 8 | 9 | build $root/install: phony $builddir/json_path_installed 10 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/cpanm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | build_dir="${script_dir}/build" 6 | cpanm="${build_dir}/cpanm" 7 | 8 | if [[ ! -x "$cpanm" ]]; then 9 | mkdir -p "$build_dir" 10 | curl -L -o "$cpanm" https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm && chmod a+x "$cpanm" 11 | fi 12 | 13 | "$cpanm" "$@" 14 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly output_dir="$1" 5 | script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | version="$(cat "${script_dir}/version")" 7 | 8 | "$script_dir"/cpanm.sh --pureperl -nL "$output_dir" "$version" 9 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/main.pl: -------------------------------------------------------------------------------- 1 | use JSON::MaybeXS; 2 | use JSON::Path; 3 | use Try::Tiny; 4 | 5 | # Avoid hashes yielding unreproducible stack traces. 6 | $Carp::MaxArgNums = -1; 7 | 8 | my $json = decode_json join("", ); 9 | 10 | my $jpath = JSON::Path->new($ARGV[0]); 11 | my @result = $jpath->values($json); 12 | print encode_json(\@result) . "\n"; 13 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | 5 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | cd "$script_dir" 8 | 9 | timeout -v 5 perl -I ./build/lib/perl5/ main.pl "$@" 10 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | ./build/cpanm --info JSON::Path > version 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/Perl_JSON-Path/version: -------------------------------------------------------------------------------- 1 | POPEFELIX/JSON-Path-1.0.6.tar.gz 2 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-ng/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/h2non/jsonpath-ng 2 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-ng/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Python_jsonpath-ng 2 | builddir = $root/build 3 | 4 | rule install 5 | command = pip3 install -r $root/requirements.txt --prefix $builddir/deps && echo > $out 6 | 7 | build $builddir/pip_installed: install | $root/requirements.txt 8 | 9 | build $root/install: phony $builddir/pip_installed 10 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-ng/requirements.txt: -------------------------------------------------------------------------------- 1 | jsonpath-ng==1.7.0 2 | pur==7.3.3 3 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-ng/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" python3 main.py "$@" 9 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-ng/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" ./build/deps/local/bin/pur -r requirements.txt 6 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-rw/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/kennknowles/python-jsonpath-rw 2 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-rw/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Python_jsonpath-rw 2 | builddir = $root/build 3 | 4 | rule install 5 | command = pip3 install -r $root/requirements.txt --prefix $builddir/deps && echo > $out 6 | 7 | build $builddir/pip_installed: install | $root/requirements.txt 8 | 9 | build $root/install: phony $builddir/pip_installed 10 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-rw/requirements.txt: -------------------------------------------------------------------------------- 1 | jsonpath-rw==1.4.0 2 | pur==7.3.3 3 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-rw/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" python3 main.py "$@" 9 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath-rw/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" ./build/deps/local/bin/pur -r requirements.txt 6 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | http://www.ultimate.com/phil/python/#jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath/NOT_FOUND_RETURNED_AS_ERROR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/implementations/Python_jsonpath/NOT_FOUND_RETURNED_AS_ERROR -------------------------------------------------------------------------------- /implementations/Python_jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Python_jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = pip3 install -r $root/requirements.txt --prefix $builddir/deps && echo > $out 6 | 7 | build $builddir/pip_installed: install | $root/requirements.txt 8 | 9 | build $root/install: phony $builddir/pip_installed 10 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath/requirements.txt: -------------------------------------------------------------------------------- 1 | jsonpath==0.82.2 2 | pur==7.3.3 3 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" python3 main.py "$@" 9 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" ./build/deps/local/bin/pur -r requirements.txt 6 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath2/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/pacifica/python-jsonpath2 2 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath2/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Python_jsonpath2 2 | builddir = $root/build 3 | 4 | rule install 5 | command = pip3 install -r $root/requirements.txt --prefix $builddir/deps && echo > $out 6 | 7 | build $builddir/pip_installed: install | $root/requirements.txt 8 | 9 | build $root/install: phony $builddir/pip_installed 10 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath2/requirements.txt: -------------------------------------------------------------------------------- 1 | jsonpath2==0.4.5 2 | pur==7.3.3 3 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath2/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" python3 main.py "$@" 9 | -------------------------------------------------------------------------------- /implementations/Python_jsonpath2/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" ./build/deps/local/bin/pur -r requirements.txt 6 | -------------------------------------------------------------------------------- /implementations/Python_python-jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/jg-rp/python-jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Python_python-jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Python_python-jsonpath 2 | builddir = $root/build 3 | 4 | rule install 5 | command = pip3 install -r $root/requirements.txt --prefix $builddir/deps && echo > $out 6 | 7 | build $builddir/pip_installed: install | $root/requirements.txt 8 | 9 | build $root/install: phony $builddir/pip_installed 10 | -------------------------------------------------------------------------------- /implementations/Python_python-jsonpath/requirements.txt: -------------------------------------------------------------------------------- 1 | python-jsonpath==1.3.0 2 | pur==7.3.3 3 | -------------------------------------------------------------------------------- /implementations/Python_python-jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | 8 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" python3 main.py "$@" 9 | -------------------------------------------------------------------------------- /implementations/Python_python-jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | PYTHONPATH="$( cd build/deps/local/lib/python*/dist-packages/ && pwd )" ./build/deps/local/bin/pur -r requirements.txt 6 | -------------------------------------------------------------------------------- /implementations/Raku_JSON-Path/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/jnthn/json-path 2 | -------------------------------------------------------------------------------- /implementations/Raku_JSON-Path/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Raku_JSON-Path 2 | builddir = $root/build 3 | 4 | rule install_json_path 5 | command = mkdir -p $builddir/deps && zef install --to=$builddir/deps JSON::Fast JSON::Path && echo > $out 6 | 7 | build $builddir/zef_installed_locally: install_json_path 8 | 9 | build $root/install: phony $builddir/zef_installed_locally 10 | -------------------------------------------------------------------------------- /implementations/Raku_JSON-Path/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | rakudo -Iinst#./build/deps main.p6 "$@" 8 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/.gitignore: -------------------------------------------------------------------------------- 1 | /gems/ 2 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/joshbuddy/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Ruby_jsonpath 2 | builddir = $root/build 3 | 4 | rule install_gems 5 | command = $root/install.sh && echo > $out 6 | 7 | build $builddir/gems_installed: install_gems | $root/install.sh $root/tag 8 | 9 | build $root/install: phony $builddir/gems_installed 10 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | tag="$(cat "${script_dir}/tag")" 7 | version="$(sed 's/^v//' <<< "$tag")" 8 | 9 | gem install -i "$script_dir"/gems jsonpath -v "$version" 10 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/main.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | require 'jsonpath' 5 | require 'multi_json' 6 | 7 | jsonpath = nil 8 | begin 9 | jsonpath = JsonPath.new(ARGV[0]) 10 | rescue Exception => e 11 | puts(e) 12 | exit(2) 13 | end 14 | 15 | begin 16 | puts MultiJson.encode(jsonpath.on(MultiJson.decode(STDIN.read))) 17 | rescue Exception => e 18 | puts(e) 19 | exit(false) 20 | end 21 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly gems_target="${script_dir}/gems" 6 | 7 | filter_runtime_differences() { 8 | sed 's/^[1234567890]*: unexpected token/unexpected token/' 9 | } 10 | 11 | GEM_PATH="$gems_target" ruby "$script_dir"/main.rb "$@" | filter_runtime_differences 12 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/tag: -------------------------------------------------------------------------------- 1 | v1.1.0 2 | -------------------------------------------------------------------------------- /implementations/Ruby_jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | curl 'https://api.github.com/repos/joshbuddy/jsonpath/releases' | grep '"tag_name":' | head -1 | sed 's/.*"tag_name": "\(.*\)",.*/\1/' > tag 6 | rm -rf build 7 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_jsonpath" 3 | version = "0.1.0" 4 | authors = ["Christoph Burgmer "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde_json = "1.0.39" 9 | jsonpath = "*" 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/greyblake/jsonpath-rs 2 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Rust_jsonpath 2 | builddir = $root/build 3 | 4 | rule compile 5 | command = (cd $root && cargo build) && mv $root/target/debug/rust_jsonpath $out && rm -r $root/target 6 | 7 | build $builddir/rust_jsonpath: compile | $root/src/main.rs $root/Cargo.lock $root/Cargo.toml 8 | 9 | build $root/install: phony $builddir/rust_jsonpath 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly runner="${script_dir}/build/rust_jsonpath" 6 | 7 | "$runner" "$@" 8 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | cargo update 6 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_jsonpath_lib" 3 | version = "0.1.0" 4 | authors = ["Christoph Burgmer "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde_json = "1.0.39" 9 | jsonpath_lib = "*" 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_lib/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/freestrings/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_lib/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Rust_jsonpath_lib 2 | builddir = $root/build 3 | 4 | rule compile 5 | command = (cd $root && cargo build) && mv $root/target/debug/rust_jsonpath_lib $out && rm -r $root/target 6 | 7 | build $builddir/rust_jsonpath_lib: compile | $root/src/main.rs $root/Cargo.lock $root/Cargo.toml 8 | 9 | build $root/install: phony $builddir/rust_jsonpath_lib 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_lib/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly runner="${script_dir}/build/rust_jsonpath_lib" 6 | 7 | "$runner" "$@" 8 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_lib/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | cargo update 6 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_plus/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_jsonpath_plus" 3 | version = "0.1.0" 4 | authors = ["Christoph Burgmer "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde_json = "1.0.39" 9 | jsonpath-plus = "*" 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_plus/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/CraftSpider/jsonpath-plus 2 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_plus/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Rust_jsonpath_plus 2 | builddir = $root/build 3 | 4 | rule compile 5 | command = (cd $root && cargo build) && mv $root/target/debug/rust_jsonpath_plus $out && rm -r $root/target 6 | 7 | build $builddir/rust_jsonpath_plus: compile | $root/src/main.rs $root/Cargo.lock $root/Cargo.toml 8 | 9 | build $root/install: phony $builddir/rust_jsonpath_plus 10 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_plus/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly runner="${script_dir}/build/rust_jsonpath_plus" 6 | 7 | "$runner" "$@" 8 | -------------------------------------------------------------------------------- /implementations/Rust_jsonpath_plus/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | cargo update 6 | -------------------------------------------------------------------------------- /implementations/Rust_serde_json_path/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_serde_json_path" 3 | version = "0.1.0" 4 | authors = ["Christoph Burgmer "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | serde_json = "1.0.39" 9 | serde_json_path = "*" 10 | -------------------------------------------------------------------------------- /implementations/Rust_serde_json_path/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/hiltontj/serde_json_path 2 | -------------------------------------------------------------------------------- /implementations/Rust_serde_json_path/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Rust_serde_json_path 2 | builddir = $root/build 3 | 4 | rule compile 5 | command = (cd $root && cargo build) && mv $root/target/debug/rust_serde_json_path $out && rm -r $root/target 6 | 7 | build $builddir/rust_serde_json_path: compile | $root/src/main.rs $root/Cargo.lock $root/Cargo.toml 8 | 9 | build $root/install: phony $builddir/rust_serde_json_path 10 | -------------------------------------------------------------------------------- /implementations/Rust_serde_json_path/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly runner="${script_dir}/build/rust_serde_json_path" 6 | 7 | "$runner" "$@" 8 | -------------------------------------------------------------------------------- /implementations/Rust_serde_json_path/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | cargo update 6 | -------------------------------------------------------------------------------- /implementations/Scala_jsonpath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/gatling/jsonpath 2 | -------------------------------------------------------------------------------- /implementations/Scala_jsonpath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | java -cp "${script_dir}/build/json-path-comparison.jar:$(cat "${script_dir}/build/cp.txt")" query.App "$@" 7 | -------------------------------------------------------------------------------- /implementations/Swift_Sextant/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | -------------------------------------------------------------------------------- /implementations/Swift_Sextant/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/KittyMac/Sextant 2 | -------------------------------------------------------------------------------- /implementations/Swift_Sextant/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/Swift_Sextant 2 | builddir = $root/build 3 | 4 | rule build 5 | command = cd $root && swift package update && swift build && cd - && cp $root/.build/*/debug/Swift_Sextant $out && rm -r $root/.build 6 | 7 | build $builddir/Swift_Sextant: build | $root/Package.swift $root/Sources/Swift_Sextant/main.swift 8 | 9 | build $root/install: phony $builddir/Swift_Sextant 10 | -------------------------------------------------------------------------------- /implementations/Swift_Sextant/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir" 7 | ./build/Swift_Sextant "$@" 8 | -------------------------------------------------------------------------------- /implementations/Swift_Sextant/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | swift package update 6 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /obj 3 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/Dotnet_Json.NET.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/LINK: -------------------------------------------------------------------------------- 1 | https://www.newtonsoft.com/json 2 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/dotNET_Json.NET 2 | builddir = $root/build 3 | 4 | rule build 5 | command = $root/install.sh $$(basename $$(dirname $out)) 6 | 7 | build $builddir/Dotnet_Json.NET: build | $root/Dotnet_Json.NET.csproj $root/Program.cs 8 | 9 | build $root/install: phony $builddir/Dotnet_Json.NET 10 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | "$script_dir"/build/Dotnet_Json.NET "$@" 6 | -------------------------------------------------------------------------------- /implementations/dotNET_Json.NET/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dotnet add package Newtonsoft.Json 6 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/.gitignore: -------------------------------------------------------------------------------- 1 | /obj 2 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/Dotnet_JsonCons.JsonPath.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/danielaparker/JsonCons.Net 2 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/dotNET_JsonCons.JsonPath 2 | builddir = $root/build 3 | 4 | rule build 5 | command = $root/install.sh $$(basename $$(dirname $out)) 6 | 7 | build $builddir/Dotnet_JsonCons.JsonPath: build | $root/Dotnet_JsonCons.JsonPath.csproj $root/Program.cs 8 | 9 | build $root/install: phony $builddir/Dotnet_JsonCons.JsonPath 10 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cd "$script_dir" 6 | timeout -v 5 build/Dotnet_JsonCons.JsonPath "$@" 7 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonCons.JsonPath/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dotnet add package JsonCons.JsonPath 6 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/.gitignore: -------------------------------------------------------------------------------- 1 | /obj 2 | /bin 3 | /.vs -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/Dotnet_JsonPath.Net.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/json-everything/json-everything 2 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/dotNET_JsonPath.Net 2 | builddir = $root/build 3 | 4 | rule build 5 | command = $root/install.sh $$(basename $$(dirname $out)) 6 | 7 | build $builddir/Dotnet_JsonPath.Net: build | $root/Dotnet_JsonPath.Net.csproj $root/Program.cs 8 | 9 | build $root/install: phony $builddir/Dotnet_JsonPath.Net 10 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cd "$script_dir" 6 | timeout -v 5 build/Dotnet_JsonPath.Net "$@" 7 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPath.Net/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dotnet add package JsonPath.Net 6 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /obj 3 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/atifaziz/JSONPath 2 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/dotNET_JsonPathLib 2 | builddir = $root/build 3 | 4 | rule build 5 | command = $root/install.sh $$(basename $$(dirname $out)) 6 | 7 | build $builddir/Dotnet_JsonPathLib: build | $root/Dotnet_JsonPathLib.csproj $root/Program.cs $root/JsonNetValueSystem.cs $root/nuget.config 8 | 9 | build $root/install: phony $builddir/Dotnet_JsonPathLib 10 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cd "$script_dir" 6 | 7 | # Timeout after some seconds as slices with 0 step seem to go into an infinite loop 8 | timeout -v 10 build/Dotnet_JsonPathLib "$@" 9 | -------------------------------------------------------------------------------- /implementations/dotNET_JsonPathLib/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dotnet add package --prerelease JsonPathLib 6 | dotnet add package Newtonsoft.Json 7 | dotnet add package Jint 8 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/.gitignore: -------------------------------------------------------------------------------- 1 | /obj 2 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/Dotnet_Manatee.Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/LINK: -------------------------------------------------------------------------------- 1 | https://github.com/gregsdennis/Manatee.Json 2 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/build.ninja: -------------------------------------------------------------------------------- 1 | root = implementations/dotNET_Manatee.Json 2 | builddir = $root/build 3 | 4 | rule build 5 | command = $root/install.sh $$(basename $$(dirname $out)) 6 | 7 | build $builddir/Dotnet_Manatee.Json: build | $root/Dotnet_Manatee.Json.csproj $root/Program.cs 8 | 9 | build $root/install: phony $builddir/Dotnet_Manatee.Json 10 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | "$script_dir"/build/Dotnet_Manatee.Json "$@" 6 | -------------------------------------------------------------------------------- /implementations/dotNET_Manatee.Json/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$BASH_SOURCE[0]")" 5 | dotnet add package Manatee.Json 6 | -------------------------------------------------------------------------------- /queries/array_slice/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice/selector: -------------------------------------------------------------------------------- 1 | $[1:3] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_exact_match/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_exact_match/selector: -------------------------------------------------------------------------------- 1 | $[0:5] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_non_overlapping_array/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_non_overlapping_array/selector: -------------------------------------------------------------------------------- 1 | $[7:10] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_object/document.json: -------------------------------------------------------------------------------- 1 | {":": 42, "more": "string", "a": 1, "b": 2, "c": 3, "1:3": "nice"} 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_object/selector: -------------------------------------------------------------------------------- 1 | $[1:3] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_partially_overlapping_array/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_on_partially_overlapping_array/selector: -------------------------------------------------------------------------------- 1 | $[1:10] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_end/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_end/selector: -------------------------------------------------------------------------------- 1 | $[2:113667776004] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_end_and_negative_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_end_and_negative_step/selector: -------------------------------------------------------------------------------- 1 | $[2:-113667776004:-1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_start/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_start/selector: -------------------------------------------------------------------------------- 1 | $[-113667776004:2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_start_end_negative_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_large_number_for_start_end_negative_step/selector: -------------------------------------------------------------------------------- 1 | $[113667776004:2:-1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_-1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_-1/selector: -------------------------------------------------------------------------------- 1 | $[-4:-5] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_0/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_0/selector: -------------------------------------------------------------------------------- 1 | $[-4:-4] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_end_and_range_of_1/selector: -------------------------------------------------------------------------------- 1 | $[-4:-3] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_-1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_-1/selector: -------------------------------------------------------------------------------- 1 | $[-4:1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_0/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_0/selector: -------------------------------------------------------------------------------- 1 | $[-4:2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_start_and_positive_end_and_range_of_1/selector: -------------------------------------------------------------------------------- 1 | $[-4:3] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step/selector: -------------------------------------------------------------------------------- 1 | $[3:0:-2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_and_start_greater_than_end/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_and_start_greater_than_end/selector: -------------------------------------------------------------------------------- 1 | $[0:3:-2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_on_partially_overlapping_array/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_on_partially_overlapping_array/selector: -------------------------------------------------------------------------------- 1 | $[7:3:-1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_only/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_negative_step_only/selector: -------------------------------------------------------------------------------- 1 | $[::-2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_end/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_end/selector: -------------------------------------------------------------------------------- 1 | $[1:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_end_and_negative_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_end_and_negative_step/selector: -------------------------------------------------------------------------------- 1 | $[3::-1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start/selector: -------------------------------------------------------------------------------- 1 | $[:2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | "second" 4 | ] 5 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end/selector: -------------------------------------------------------------------------------- 1 | $[:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end_and_step_empty/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | "second" 4 | ] 5 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end_and_step_empty/selector: -------------------------------------------------------------------------------- 1 | $[::] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end_on_object/document.json: -------------------------------------------------------------------------------- 1 | {":": 42, "more": "string"} 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_end_on_object/selector: -------------------------------------------------------------------------------- 1 | $[:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_negative_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_open_start_and_negative_step/selector: -------------------------------------------------------------------------------- 1 | $[:2:-1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_-1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_-1/selector: -------------------------------------------------------------------------------- 1 | $[3:-4] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_0/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_0/selector: -------------------------------------------------------------------------------- 1 | $[3:-3] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_1/document.json: -------------------------------------------------------------------------------- 1 | [2, "a", 4, 5, 100, "nice"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_positive_start_and_negative_end_and_range_of_1/selector: -------------------------------------------------------------------------------- 1 | $[3:-2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_-1/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | "second", 4 | "third", 5 | "forth" 6 | ] 7 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_-1/selector: -------------------------------------------------------------------------------- 1 | $[2:1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_0/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | "second" 4 | ] 5 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_0/selector: -------------------------------------------------------------------------------- 1 | $[0:0] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_1/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | "second" 4 | ] 5 | -------------------------------------------------------------------------------- /queries/array_slice_with_range_of_1/selector: -------------------------------------------------------------------------------- 1 | $[0:1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_-1_and_open_end/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_-1_and_open_end/selector: -------------------------------------------------------------------------------- 1 | $[-1:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_-2_and_open_end/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_-2_and_open_end/selector: -------------------------------------------------------------------------------- 1 | $[-2:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_large_negative_number_and_open_end_on_short_array/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_start_large_negative_number_and_open_end_on_short_array/selector: -------------------------------------------------------------------------------- 1 | $[-4:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step/selector: -------------------------------------------------------------------------------- 1 | $[0:3:2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_0/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_0/selector: -------------------------------------------------------------------------------- 1 | $[0:3:0] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_1/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_1/selector: -------------------------------------------------------------------------------- 1 | $[0:3:1] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_and_leading_zeros/document.json: -------------------------------------------------------------------------------- 1 | [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_and_leading_zeros/selector: -------------------------------------------------------------------------------- 1 | $[010:024:010] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_but_end_not_aligned/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_but_end_not_aligned/selector: -------------------------------------------------------------------------------- 1 | $[0:4:2] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_empty/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_empty/selector: -------------------------------------------------------------------------------- 1 | $[1:3:] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_only/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/array_slice_with_step_only/selector: -------------------------------------------------------------------------------- 1 | $[::2] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation/selector: -------------------------------------------------------------------------------- 1 | $['key'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/bracket_notation_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/bracket_notation_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "first", 3 | { 4 | "key": [ 5 | "first nested", 6 | { 7 | "more": [ 8 | { 9 | "nested": ["deepest", "second"] 10 | }, 11 | ["more", "values"] 12 | ] 13 | } 14 | ] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /queries/bracket_notation_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..[0] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_on_object_without_key/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_on_object_without_key/selector: -------------------------------------------------------------------------------- 1 | $['missing'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_NFC_path_on_NFD_key/document.json: -------------------------------------------------------------------------------- 1 | {"ü": 42} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_NFC_path_on_NFD_key/selector: -------------------------------------------------------------------------------- 1 | $['ü'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_dot/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "one": {"key": "value"}, 3 | "two": {"some": "more", "key": "other value"}, 4 | "two.some": "42" 5 | } 6 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_dot/selector: -------------------------------------------------------------------------------- 1 | $['two.some'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_double_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_double_quotes/selector: -------------------------------------------------------------------------------- 1 | $["key"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_path/document.json: -------------------------------------------------------------------------------- 1 | {"": 42, "''": 123, "\"\"": 222} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_path/selector: -------------------------------------------------------------------------------- 1 | $[] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_string/document.json: -------------------------------------------------------------------------------- 1 | {"": 42, "''": 123, "\"\"": 222} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_string/selector: -------------------------------------------------------------------------------- 1 | $[''] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_string_doubled_quoted/document.json: -------------------------------------------------------------------------------- 1 | {"": 42, "''": 123, "\"\"": 222} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_empty_string_doubled_quoted/selector: -------------------------------------------------------------------------------- 1 | $[""] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_negative_number_on_short_array/document.json: -------------------------------------------------------------------------------- 1 | ["one element"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_negative_number_on_short_array/selector: -------------------------------------------------------------------------------- 1 | $[-2] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number/selector: -------------------------------------------------------------------------------- 1 | $[2] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_-1/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_-1/selector: -------------------------------------------------------------------------------- 1 | $[-1] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_-1_on_empty_array/document.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_-1_on_empty_array/selector: -------------------------------------------------------------------------------- 1 | $[-1] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_0/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_0/selector: -------------------------------------------------------------------------------- 1 | $[0] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length/document.json: -------------------------------------------------------------------------------- 1 | [[1], [2,3]] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_after_dot_notation_with_wildcard_on_nested_arrays_with_different_length/selector: -------------------------------------------------------------------------------- 1 | $.*[1] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_object/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_object/selector: -------------------------------------------------------------------------------- 1 | $[0] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_short_array/document.json: -------------------------------------------------------------------------------- 1 | ["one element"] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_short_array/selector: -------------------------------------------------------------------------------- 1 | $[1] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_string/document.json: -------------------------------------------------------------------------------- 1 | "Hello World" 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_number_on_string/selector: -------------------------------------------------------------------------------- 1 | $[0] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_array_slice_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | ":": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_array_slice_literal/selector: -------------------------------------------------------------------------------- 1 | $[':'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_closing_bracket_literal/document.json: -------------------------------------------------------------------------------- 1 | {"]": 42} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_closing_bracket_literal/selector: -------------------------------------------------------------------------------- 1 | $[']'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_current_object_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "@": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_current_object_literal/selector: -------------------------------------------------------------------------------- 1 | $['@'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_dot_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | ".": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_dot_literal/selector: -------------------------------------------------------------------------------- 1 | $['.'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_dot_wildcard/document.json: -------------------------------------------------------------------------------- 1 | {"key": 42, ".*": 1, "": 10} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_dot_wildcard/selector: -------------------------------------------------------------------------------- 1 | $['.*'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_double_quote_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "\"": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_double_quote_literal/selector: -------------------------------------------------------------------------------- 1 | $['"'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_escaped_backslash/document.json: -------------------------------------------------------------------------------- 1 | {"\\":"value"} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_escaped_backslash/selector: -------------------------------------------------------------------------------- 1 | $['\\'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_escaped_single_quote/document.json: -------------------------------------------------------------------------------- 1 | {"'":"value"} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_escaped_single_quote/selector: -------------------------------------------------------------------------------- 1 | $['\''] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_number_on_object/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_number_on_object/selector: -------------------------------------------------------------------------------- 1 | $['0'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_root_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "$": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_root_literal/selector: -------------------------------------------------------------------------------- 1 | $['$'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_special_characters_combined/document.json: -------------------------------------------------------------------------------- 1 | {":@.\"$,*'\\": 42} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_special_characters_combined/selector: -------------------------------------------------------------------------------- 1 | $[':@."$,*\'\\'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_string_and_unescaped_single_quote/document.json: -------------------------------------------------------------------------------- 1 | {"single'quote":"value"} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_string_and_unescaped_single_quote/selector: -------------------------------------------------------------------------------- 1 | $['single'quote'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_union_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | ",": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_union_literal/selector: -------------------------------------------------------------------------------- 1 | $[','] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_wildcard_literal/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/bracket_notation_with_quoted_wildcard_literal/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_wildcard_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "*": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_wildcard_literal/selector: -------------------------------------------------------------------------------- 1 | $['*'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_wildcard_literal_on_object_without_key/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "another": "entry" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_quoted_wildcard_literal_on_object_without_key/selector: -------------------------------------------------------------------------------- 1 | $['*'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_spaces/document.json: -------------------------------------------------------------------------------- 1 | {" a": 1, "a": 2, " a ": 3, "a ": 4, " 'a' ": 5, " 'a": 6, "a' ": 7, " \"a\" ": 8, "\"a\"": 9} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_spaces/selector: -------------------------------------------------------------------------------- 1 | $[ 'a' ] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_string_including_dot_wildcard/document.json: -------------------------------------------------------------------------------- 1 | {"nice": 42, "ni.*": 1, "mice": 100} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_string_including_dot_wildcard/selector: -------------------------------------------------------------------------------- 1 | $['ni.*'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_two_literals_separated_by_dot/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "one": {"key": "value"}, 3 | "two": {"some": "more", "key": "other value"}, 4 | "two.some": "42", 5 | "two'.'some": "43" 6 | } 7 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_two_literals_separated_by_dot/selector: -------------------------------------------------------------------------------- 1 | $['two'.'some'] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_two_literals_separated_by_dot_without_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "one": {"key": "value"}, 3 | "two": {"some": "more", "key": "other value"}, 4 | "two.some": "42" 5 | } 6 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_two_literals_separated_by_dot_without_quotes/selector: -------------------------------------------------------------------------------- 1 | $[two.some] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_array_slice/document.json: -------------------------------------------------------------------------------- 1 | [[1, 2], ["a", "b"], [0, 0]] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_array_slice/selector: -------------------------------------------------------------------------------- 1 | $[0:2][*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard/document.json: -------------------------------------------------------------------------------- 1 | [{"bar": [42]}] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_dot_notation_after_bracket_notation_with_wildcard/selector: -------------------------------------------------------------------------------- 1 | $[*].bar[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/bracket_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "another key": { 4 | "complex": "string", 5 | "primitives": [0, 1] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_array/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "string", 3 | 42, 4 | { 5 | "key": "value" 6 | }, 7 | [0, 1] 8 | ] 9 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_array/selector: -------------------------------------------------------------------------------- 1 | $[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_empty_array/document.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_empty_array/selector: -------------------------------------------------------------------------------- 1 | $[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_empty_object/document.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_empty_object/selector: -------------------------------------------------------------------------------- 1 | $[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_null_value_array/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | 40, 3 | null, 4 | 42 5 | ] 6 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_null_value_array/selector: -------------------------------------------------------------------------------- 1 | $[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_object/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/bracket_notation_with_wildcard_on_object/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_object/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "some": "string", 3 | "int": 42, 4 | "object": { 5 | "key": "value" 6 | }, 7 | "array": [0, 1] 8 | } 9 | -------------------------------------------------------------------------------- /queries/bracket_notation_with_wildcard_on_object/selector: -------------------------------------------------------------------------------- 1 | $[*] 2 | -------------------------------------------------------------------------------- /queries/bracket_notation_without_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/bracket_notation_without_quotes/selector: -------------------------------------------------------------------------------- 1 | $[key] 2 | -------------------------------------------------------------------------------- /queries/current_with_dot_notation/document.json: -------------------------------------------------------------------------------- 1 | {"a": 1} 2 | -------------------------------------------------------------------------------- /queries/current_with_dot_notation/selector: -------------------------------------------------------------------------------- 1 | @.a 2 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "other": {"key": [{"key": 42}]} 4 | } 5 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation/selector: -------------------------------------------------------------------------------- 1 | $.['key'] 2 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation_with_double_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "other": {"key": [{"key": 42}]} 4 | } 5 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation_with_double_quotes/selector: -------------------------------------------------------------------------------- 1 | $.["key"] 2 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation_without_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "other": {"key": [{"key": 42}]} 4 | } 5 | -------------------------------------------------------------------------------- /queries/dot_bracket_notation_without_quotes/selector: -------------------------------------------------------------------------------- 1 | $.[key] 2 | -------------------------------------------------------------------------------- /queries/dot_notation/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation/selector: -------------------------------------------------------------------------------- 1 | $.key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_array_slice/document.json: -------------------------------------------------------------------------------- 1 | [{"key": "ey"}, {"key": "bee"}, {"key": "see"}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_array_slice/selector: -------------------------------------------------------------------------------- 1 | $[0:2].key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_after_bracket_notation_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "k": [{"key": "some value"}, {"key": 42}], 3 | "kk": [[{"key": 100}, {"key": 200}, {"key": 300}], [{"key": 400}, {"key": 500}, {"key": 600}]], 4 | "key": [0, 1] 5 | } 6 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..[1].key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard/document.json: -------------------------------------------------------------------------------- 1 | [{"a": 1},{"a": 1}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard/selector: -------------------------------------------------------------------------------- 1 | $[*].a 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard_on_one_matching/document.json: -------------------------------------------------------------------------------- 1 | [{"a": 1}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard_on_one_matching/selector: -------------------------------------------------------------------------------- 1 | $[*].a 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard_on_some_matching/document.json: -------------------------------------------------------------------------------- 1 | [{"a": 1},{"b": 1}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_bracket_notation_with_wildcard_on_some_matching/selector: -------------------------------------------------------------------------------- 1 | $[*].a 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_filter_expression/document.json: -------------------------------------------------------------------------------- 1 | [{"id": 42, "name": "forty-two"}, {"id": 1, "name": "one"}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_filter_expression/selector: -------------------------------------------------------------------------------- 1 | $[?(@.id==42)].name 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "key": "value", 4 | "array": [ 5 | {"key": "something"}, 6 | {"key": {"key": "russian dolls"}} 7 | ] 8 | }, 9 | "key": "top" 10 | } 11 | -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent_after_dot_notation/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_after_recursive_descent_after_dot_notation/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent_after_dot_notation/selector: -------------------------------------------------------------------------------- 1 | $.store..price 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent_with_extra_dot/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_after_recursive_descent_with_extra_dot/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent_with_extra_dot/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "key": "value", 4 | "array": [ 5 | {"key": "something"}, 6 | {"key": {"key": "russian dolls"}} 7 | ] 8 | }, 9 | "key": "top" 10 | } 11 | -------------------------------------------------------------------------------- /queries/dot_notation_after_recursive_descent_with_extra_dot/selector: -------------------------------------------------------------------------------- 1 | $...key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_union/document.json: -------------------------------------------------------------------------------- 1 | [{"key": "ey"}, {"key": "bee"}, {"key": "see"}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_union/selector: -------------------------------------------------------------------------------- 1 | $[0,2].key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_after_union_with_keys/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "one": {"key": "value"}, 3 | "two": {"k": "v"}, 4 | "three": {"some": "more", "key": "other value"} 5 | } 6 | -------------------------------------------------------------------------------- /queries/dot_notation_after_union_with_keys/selector: -------------------------------------------------------------------------------- 1 | $['one','three'].key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array/document.json: -------------------------------------------------------------------------------- 1 | [0, 1] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array/selector: -------------------------------------------------------------------------------- 1 | $.key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array_value/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": ["first", "second"] 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array_value/selector: -------------------------------------------------------------------------------- 1 | $.key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array_with_containing_object_matching_key/document.json: -------------------------------------------------------------------------------- 1 | [{"id": 2}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_array_with_containing_object_matching_key/selector: -------------------------------------------------------------------------------- 1 | $.id 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_empty_object_value/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": {} 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_on_empty_object_value/selector: -------------------------------------------------------------------------------- 1 | $.key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_null_value/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": null 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_on_null_value/selector: -------------------------------------------------------------------------------- 1 | $.key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_object_without_key/document.json: -------------------------------------------------------------------------------- 1 | {"key": "value"} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_on_object_without_key/selector: -------------------------------------------------------------------------------- 1 | $.missing 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_dash/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": 42, 3 | "key-": 43, 4 | "-": 44, 5 | "dash": 45, 6 | "-dash": 46, 7 | "": 47, 8 | "key-dash": "value", 9 | "something": "else" 10 | } 11 | -------------------------------------------------------------------------------- /queries/dot_notation_with_dash/selector: -------------------------------------------------------------------------------- 1 | $.key-dash 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_double_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "\"key\"": 42 4 | } 5 | -------------------------------------------------------------------------------- /queries/dot_notation_with_double_quotes/selector: -------------------------------------------------------------------------------- 1 | $."key" 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_double_quotes_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_double_quotes_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_double_quotes_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "key": "value", 4 | "\"key\"": 100, 5 | "array": [ 6 | {"key": "something", "\"key\"": 0}, 7 | {"key": {"key": "russian dolls"}, "\"key\"": {"\"key\"": 99}} 8 | ] 9 | }, 10 | "key": "top", 11 | "\"key\"": 42 12 | } 13 | -------------------------------------------------------------------------------- /queries/dot_notation_with_double_quotes_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $.."key" 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_empty_path/document.json: -------------------------------------------------------------------------------- 1 | {"key": 42, "": 9001, "''": "nice"} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_empty_path/selector: -------------------------------------------------------------------------------- 1 | $. 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_in/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "in": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_in/selector: -------------------------------------------------------------------------------- 1 | $.in 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_length/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "length": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_length/selector: -------------------------------------------------------------------------------- 1 | $.length 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_length_on_array/document.json: -------------------------------------------------------------------------------- 1 | [4, 5, 6] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_length_on_array/selector: -------------------------------------------------------------------------------- 1 | $.length 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_null/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "null": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_null/selector: -------------------------------------------------------------------------------- 1 | $.null 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_true/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "true": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_named_true/selector: -------------------------------------------------------------------------------- 1 | $.true 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_root_literal/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "$": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_key_root_literal/selector: -------------------------------------------------------------------------------- 1 | $.$ 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_non_ASCII_key/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "屬性": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_with_non_ASCII_key/selector: -------------------------------------------------------------------------------- 1 | $.屬性 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number/selector: -------------------------------------------------------------------------------- 1 | $.2 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number_-1/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number_-1/selector: -------------------------------------------------------------------------------- 1 | $.-1 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number_on_object/document.json: -------------------------------------------------------------------------------- 1 | {"a": "first", "2": "second", "b": "third"} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_number_on_object/selector: -------------------------------------------------------------------------------- 1 | $.2 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "'key'": 42 4 | } 5 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes/selector: -------------------------------------------------------------------------------- 1 | $.'key' 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_single_quotes_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "key": "value", 4 | "'key'": 100, 5 | "array": [ 6 | {"key": "something", "'key'": 0}, 7 | {"key": {"key": "russian dolls"}, "'key'": {"'key'": 99}} 8 | ] 9 | }, 10 | "key": "top", 11 | "'key'": 42 12 | } 13 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..'key' 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes_and_dot/document.json: -------------------------------------------------------------------------------- 1 | {"some.key": 42, "some": {"key": "value"}, "'some.key'": 43} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_single_quotes_and_dot/selector: -------------------------------------------------------------------------------- 1 | $.'some.key' 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_space_padded_key/document.json: -------------------------------------------------------------------------------- 1 | {" a": 1, "a": 2, " a ": 3, "": 4} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_space_padded_key/selector: -------------------------------------------------------------------------------- 1 | $. a 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard/document.json: -------------------------------------------------------------------------------- 1 | [{"bar": [42]}] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_dot_notation_after_dot_notation_with_wildcard/selector: -------------------------------------------------------------------------------- 1 | $.*.bar.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays/document.json: -------------------------------------------------------------------------------- 1 | [[1, 2, 3], [4, 5, 6]] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_dot_notation_with_wildcard_on_nested_arrays/selector: -------------------------------------------------------------------------------- 1 | $.*.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "another key": { 4 | "complex": "string", 5 | "primitives": [0, 1] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_null_value_array/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_wildcard_after_recursive_descent_on_null_value_array/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_null_value_array/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | 40, 3 | null, 4 | 42 5 | ] 6 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_null_value_array/selector: -------------------------------------------------------------------------------- 1 | $..* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_scalar/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_wildcard_after_recursive_descent_on_scalar/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_scalar/document.json: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_after_recursive_descent_on_scalar/selector: -------------------------------------------------------------------------------- 1 | $..* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_array/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "string", 3 | 42, 4 | { 5 | "key": "value" 6 | }, 7 | [0, 1] 8 | ] 9 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_array/selector: -------------------------------------------------------------------------------- 1 | $.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_empty_array/document.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_empty_array/selector: -------------------------------------------------------------------------------- 1 | $.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_empty_object/document.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_empty_object/selector: -------------------------------------------------------------------------------- 1 | $.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_object/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/dot_notation_with_wildcard_on_object/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_object/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "some": "string", 3 | "int": 42, 4 | "object": { 5 | "key": "value" 6 | }, 7 | "array": [0, 1] 8 | } 9 | -------------------------------------------------------------------------------- /queries/dot_notation_with_wildcard_on_object/selector: -------------------------------------------------------------------------------- 1 | $.* 2 | -------------------------------------------------------------------------------- /queries/dot_notation_without_dot/document.json: -------------------------------------------------------------------------------- 1 | {"a": 1, "$a": 2} 2 | -------------------------------------------------------------------------------- /queries/dot_notation_without_dot/selector: -------------------------------------------------------------------------------- 1 | $a 2 | -------------------------------------------------------------------------------- /queries/dot_notation_without_root/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_without_root/selector: -------------------------------------------------------------------------------- 1 | .key 2 | -------------------------------------------------------------------------------- /queries/dot_notation_without_root_and_dot/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value" 3 | } 4 | -------------------------------------------------------------------------------- /queries/dot_notation_without_root_and_dot/selector: -------------------------------------------------------------------------------- 1 | key 2 | -------------------------------------------------------------------------------- /queries/empty/document.json: -------------------------------------------------------------------------------- 1 | {"a": 42, "": 21} 2 | -------------------------------------------------------------------------------- /queries/empty/selector: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /queries/filter_expression_after_dot_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/filter_expression_after_dot_notation_with_wildcard_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/filter_expression_after_dot_notation_with_wildcard_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..*[?(@.id>2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/filter_expression_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/filter_expression_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | {"id": 2, "more": [{"id": 2}, {"more": {"id": 2}}, {"id": {"id": 2}}, [{"id": 2}]]} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..[?(@.id==2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_on_object/document.json: -------------------------------------------------------------------------------- 1 | {"key": 42, "another": {"key": 1}} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_on_object/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_addition/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 60}, {"key": 50}, {"key": 10}, {"key": -50}, {"key+50": 100}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_addition/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key+50==100)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 42}, 3 | {"key": 43}, 4 | {"key": 44} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>42 && @.key<44)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator_and_value_false/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 1}, 3 | {"key": 3}, 4 | {"key": "nice"}, 5 | {"key": true}, 6 | {"key": null}, 7 | {"key": false}, 8 | {"key": {}}, 9 | {"key": []}, 10 | {"key": -1}, 11 | {"key": 0}, 12 | {"key": ""} 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator_and_value_false/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>0 && false)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator_and_value_true/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 1}, 3 | {"key": 3}, 4 | {"key": "nice"}, 5 | {"key": true}, 6 | {"key": null}, 7 | {"key": false}, 8 | {"key": {}}, 9 | {"key": []}, 10 | {"key": -1}, 11 | {"key": 0}, 12 | {"key": ""} 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_and_operator_and_value_true/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>0 && true)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 42}, 3 | {"key": 43}, 4 | {"key": 44} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>43 || @.key<43)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator_and_value_false/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 1}, 3 | {"key": 3}, 4 | {"key": "nice"}, 5 | {"key": true}, 6 | {"key": null}, 7 | {"key": false}, 8 | {"key": {}}, 9 | {"key": []}, 10 | {"key": -1}, 11 | {"key": 0}, 12 | {"key": ""} 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator_and_value_false/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>0 || false)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator_and_value_true/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 1}, 3 | {"key": 3}, 4 | {"key": "nice"}, 5 | {"key": true}, 6 | {"key": null}, 7 | {"key": false}, 8 | {"key": {}}, 9 | {"key": []}, 10 | {"key": -1}, 11 | {"key": 0}, 12 | {"key": ""} 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_boolean_or_operator_and_value_true/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>0 || true)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"some": "value"} 11 | ] 12 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation/selector: -------------------------------------------------------------------------------- 1 | $[?(@['key']==42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_and_current_object_literal/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"@key": 0}, 3 | {"@key": 42}, 4 | {"key": 42}, 5 | {"@key": 43}, 6 | {"some": "value"} 7 | ] 8 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_and_current_object_literal/selector: -------------------------------------------------------------------------------- 1 | $[?(@['@key']==42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_-1/document.json: -------------------------------------------------------------------------------- 1 | [[2, 3], ["a"], [0, 2], [2]] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_-1/selector: -------------------------------------------------------------------------------- 1 | $[?(@[-1]==2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_number/document.json: -------------------------------------------------------------------------------- 1 | [["a", "b"], ["x", "y"]] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_number/selector: -------------------------------------------------------------------------------- 1 | $[?(@[1]=='b')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_number_on_object/document.json: -------------------------------------------------------------------------------- 1 | {"1": ["a", "b"], "2": ["x", "y"]} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_bracket_notation_with_number_on_object/selector: -------------------------------------------------------------------------------- 1 | $[?(@[1]=='b')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_current_object/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | "some value", 3 | null, 4 | "value", 5 | 0, 6 | 1, 7 | -1, 8 | "", 9 | [], 10 | {}, 11 | false, 12 | true 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_current_object/selector: -------------------------------------------------------------------------------- 1 | $[?(@)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_different_grouped_operators/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "a": true 4 | }, 5 | { 6 | "a": true, 7 | "b": true 8 | }, 9 | { 10 | "a": true, 11 | "b": true, 12 | "c": true 13 | }, 14 | { 15 | "b": true, 16 | "c": true 17 | }, 18 | { 19 | "a": true, 20 | "c": true 21 | }, 22 | { 23 | "c": true 24 | }, 25 | { 26 | "b": true 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /queries/filter_expression_with_different_grouped_operators/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a && (@.b || @.c))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_different_ungrouped_operators/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a && @.b || @.c)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_division/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 60}, {"key": 50}, {"key": 10}, {"key": -50}, {"key/10": 5}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_division/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key/10==5)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_dash/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key-dash": "value" 4 | } 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_dash/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key-dash == 'value')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_number/document.json: -------------------------------------------------------------------------------- 1 | [{"a": "first", "2": "second", "b": "third"}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_number/selector: -------------------------------------------------------------------------------- 1 | $[?(@.2 == 'second')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_number_on_array/document.json: -------------------------------------------------------------------------------- 1 | [["first", "second", "third", "forth", "fifth"]] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_dot_notation_with_number_on_array/selector: -------------------------------------------------------------------------------- 1 | $[?(@.2 == 'third')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_empty_expression/document.json: -------------------------------------------------------------------------------- 1 | [1, {"key": 42}, "value", null] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_empty_expression/selector: -------------------------------------------------------------------------------- 1 | $[?()] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array/selector: -------------------------------------------------------------------------------- 1 | $[?(@.d==["v1","v2"])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_for_array_slice_with_range_1/document.json: -------------------------------------------------------------------------------- 1 | [[1, 2, 3], [1], [2, 3], 1, 2] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_for_array_slice_with_range_1/selector: -------------------------------------------------------------------------------- 1 | $[?(@[0:1]==[1])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_for_dot_notation_with_star/document.json: -------------------------------------------------------------------------------- 1 | [[1,2], [2,3], [1], [2], [1, 2, 3], 1, 2, 3] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_for_dot_notation_with_star/selector: -------------------------------------------------------------------------------- 1 | $[?(@.*==[1,2])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_or_equals_true/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"d": ["v1", "v2"] }, 3 | {"d": ["a", "b"] }, 4 | {"d" : true} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_or_equals_true/selector: -------------------------------------------------------------------------------- 1 | $[?(@.d==["v1","v2"] || (@.d == true))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_array_with_single_quotes/selector: -------------------------------------------------------------------------------- 1 | $[?(@.d==['v1','v2'])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_boolean_expression_value/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 42}, {"key": 43}, {"key": 44}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_boolean_expression_value/selector: -------------------------------------------------------------------------------- 1 | $[?((@.key<44)==false)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_false/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==false)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_null/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==null)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_array_slice_with_range_1/document.json: -------------------------------------------------------------------------------- 1 | [[1, 2, 3], [1], [2, 3], 1, 2] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_array_slice_with_range_1/selector: -------------------------------------------------------------------------------- 1 | $[?(@[0:1]==1)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_bracket_notation_with_star/document.json: -------------------------------------------------------------------------------- 1 | [[1,2], [2,3], [1], [2], [1, 2, 3], 1, 2, 3] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_bracket_notation_with_star/selector: -------------------------------------------------------------------------------- 1 | $[?(@[*]==2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_dot_notation_with_star/document.json: -------------------------------------------------------------------------------- 1 | [[1,2], [2,3], [1], [2], [1, 2, 3], 1, 2, 3] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_for_dot_notation_with_star/selector: -------------------------------------------------------------------------------- 1 | $[?(@.*==2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_with_fraction/document.json: -------------------------------------------------------------------------------- 1 | [{"key": -12.3}, {"key": -0.123}, {"key": -12}, {"key": 12.3}, {"key": 2}, {"key": "-0.123e2"}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_with_fraction/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==-0.123e2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_with_leading_zeros/document.json: -------------------------------------------------------------------------------- 1 | [{"key": "010"}, {"key": "10"}, {"key": 10}, {"key": 0}, {"key": 8}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_number_with_leading_zeros/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==010)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_object/selector: -------------------------------------------------------------------------------- 1 | $[?(@.d=={"k":"v"})] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_array_of_numbers/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | 0, 3 | 42, 4 | -1, 5 | 41, 6 | 43, 7 | 42.0001, 8 | 41.9999, 9 | null, 10 | 100 11 | ] 12 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_array_of_numbers/selector: -------------------------------------------------------------------------------- 1 | $[?(@==42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_array_without_match/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 42}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_array_without_match/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==43)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_object/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": {"key": 0}, 3 | "b": {"key": 42}, 4 | "c": {"key": -1}, 5 | "d": {"key": 41}, 6 | "e": {"key": 43}, 7 | "f": {"key": 42.0001}, 8 | "g": {"key": 41.9999}, 9 | "h": {"key": 100}, 10 | "i": {"some": "value"} 11 | } 12 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_object/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_object_with_key_matching_query/document.json: -------------------------------------------------------------------------------- 1 | {"id": 2} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_on_object_with_key_matching_query/selector: -------------------------------------------------------------------------------- 1 | $[?(@.id==2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=="value")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_in_NFC/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": "something"}, 3 | {"key": "Mot\u00f6rhead"}, 4 | {"key": "mot\u00f6rhead"}, 5 | {"key": "Motorhead"}, 6 | {"key": "Motoo\u0308rhead"}, 7 | {"key": "motoo\u0308rhead"} 8 | ] 9 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_in_NFC/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=="Motörhead")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_current_object_literal/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": "some"}, 3 | {"key": "value"}, 4 | {"key": "hi@example.com"} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_current_object_literal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=="hi@example.com")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_dot_literal/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": "some"}, 3 | {"key": "value"}, 4 | {"key": "some.value"} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_dot_literal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=="some.value")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_single_quotes/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": "some"}, 3 | {"key": "value"} 4 | ] 5 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_single_quotes/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=='value')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_unicode_character_escape/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": "something"}, 3 | {"key": "Mot\u00f6rhead"}, 4 | {"key": "mot\u00f6rhead"}, 5 | {"key": "Motorhead"}, 6 | {"key": "Motoo\u0308rhead"}, 7 | {"key": "motoo\u0308rhead"} 8 | ] 9 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_string_with_unicode_character_escape/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=="Mot\u00f6rhead")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_true/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key==true)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_with_path_and_path/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key1==@.key2)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_with_root_reference/document.json: -------------------------------------------------------------------------------- 1 | {"value": 42, "items": [{"key": 10}, {"key": 42}, {"key": 50}]} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_equals_with_root_reference/selector: -------------------------------------------------------------------------------- 1 | $.items[?(@.key==$.value)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_greater_than/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_greater_than/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_greater_than_or_equal/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_greater_than_or_equal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>=42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_greater_than_string/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key>"VALUE")] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_in_array_of_values/document.json: -------------------------------------------------------------------------------- 1 | [{"d": 1}, {"d": 2}, {"d": 1}, {"d": 3}, {"d": 4}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_in_array_of_values/selector: -------------------------------------------------------------------------------- 1 | $[?(@.d in [2, 3])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_in_current_object/document.json: -------------------------------------------------------------------------------- 1 | [{"d": [1, 2, 3]}, {"d": [2]}, {"d": [1]}, {"d": [3, 4]}, {"d": [4, 2]}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_in_current_object/selector: -------------------------------------------------------------------------------- 1 | $[?(2 in @.d)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_free_function/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | [1,2,3,4,5], 3 | [1,2,3,4], 4 | [1,2,3] 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_free_function/selector: -------------------------------------------------------------------------------- 1 | $[?(length(@) == 4)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_function/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | [1,2,3,4,5], 3 | [1,2,3,4], 4 | [1,2,3] 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_function/selector: -------------------------------------------------------------------------------- 1 | $[?(@.length() == 4)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_property/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | [1,2,3,4,5], 3 | [1,2,3,4], 4 | [1,2,3] 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_length_property/selector: -------------------------------------------------------------------------------- 1 | $[?(@.length == 4)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_less_than/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_less_than/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key<42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_less_than_or_equal/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_less_than_or_equal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key<=42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_local_dot_key_and_null_in_data/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": "value"}, 4 | null, 5 | {"key": 42}, 6 | {"some": "value"} 7 | ] 8 | -------------------------------------------------------------------------------- /queries/filter_expression_with_local_dot_key_and_null_in_data/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key='value')] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_multiplication/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 60}, {"key": 50}, {"key": 10}, {"key": -50}, {"key*2": 100}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_multiplication/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key*2==100)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_equals/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_equals/selector: -------------------------------------------------------------------------------- 1 | $[?(!(@.key==42))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_equals_array_or_equals_true/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"d": ["v1", "v2"] }, 3 | {"d": ["a", "b"] }, 4 | {"d" : true} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_equals_array_or_equals_true/selector: -------------------------------------------------------------------------------- 1 | $[?(!(@.d==["v1","v2"]) || (@.d == true))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_less_than/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"key": 0}, 3 | {"key": 42}, 4 | {"key": -1}, 5 | {"key": 41}, 6 | {"key": 43}, 7 | {"key": 42.0001}, 8 | {"key": 41.9999}, 9 | {"key": 100}, 10 | {"key": "43"}, 11 | {"key": "42"}, 12 | {"key": "41"}, 13 | {"key": "value"}, 14 | {"some": "value"} 15 | ] 16 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_less_than/selector: -------------------------------------------------------------------------------- 1 | $[?(!(@.key<42))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_negation_and_without_value/selector: -------------------------------------------------------------------------------- 1 | $[?(!@.key)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_non_singular_existence_test/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"a": 0}, 3 | {"a": "x"}, 4 | {"a": false}, 5 | {"a": true}, 6 | {"a": null}, 7 | {"a": []}, 8 | {"a": [1]}, 9 | {"a": [1, 2]}, 10 | {"a": {}}, 11 | {"a": {"x": "y"}}, 12 | {"a": {"x": "y", "w": "z"}} 13 | ] 14 | -------------------------------------------------------------------------------- /queries/filter_expression_with_non_singular_existence_test/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a.*)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_not_equals/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key!=42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_not_equals_array_or_equals_true/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"d": ["v1", "v2"] }, 3 | {"d": ["a", "b"] }, 4 | {"d" : true} 5 | ] 6 | -------------------------------------------------------------------------------- /queries/filter_expression_with_not_equals_array_or_equals_true/selector: -------------------------------------------------------------------------------- 1 | $[?((@.d!=["v1","v2"]) || (@.d == true))] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_parent_axis_operator/selector: -------------------------------------------------------------------------------- 1 | $[*].bookmarks[?(@.page == 45)]^^^ 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_regular_expression/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"name": "hullo world"}, 3 | {"name": "hello world"}, 4 | {"name": "yes hello world"}, 5 | {"name": "HELLO WORLD"}, 6 | {"name": "good bye"} 7 | ] 8 | -------------------------------------------------------------------------------- /queries/filter_expression_with_regular_expression/selector: -------------------------------------------------------------------------------- 1 | $[?(@.name=~/hello.*/)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_regular_expression_from_member/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"name": "hullo world"}, 3 | {"name": "hello world"}, 4 | {"name": "yes hello world"}, 5 | {"name": "HELLO WORLD"}, 6 | {"name": "good bye"}, 7 | {"pattern": "hello.*"} 8 | ] 9 | -------------------------------------------------------------------------------- /queries/filter_expression_with_regular_expression_from_member/selector: -------------------------------------------------------------------------------- 1 | $[?(@.name=~/@.pattern/)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_set_wise_comparison_to_scalar/document.json: -------------------------------------------------------------------------------- 1 | [[1,2],[3,4],[5,6]] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_set_wise_comparison_to_scalar/selector: -------------------------------------------------------------------------------- 1 | $[?(@[*]>=4)] -------------------------------------------------------------------------------- /queries/filter_expression_with_set_wise_comparison_to_set/document.json: -------------------------------------------------------------------------------- 1 | {"x":[[1,2],[3,4],[5,6]],"y":[3,4,5]} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_set_wise_comparison_to_set/selector: -------------------------------------------------------------------------------- 1 | $.x[?(@[*]>=$.y[*])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_single_equal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key=42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subfilter/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "a": [{"price": 1}, {"price": 3}] 4 | }, 5 | { 6 | "a": [{"price": 11}] 7 | }, 8 | { 9 | "a": [{"price": 8}, {"price": 12}, {"price": 3}] 10 | }, 11 | { 12 | "a": [] 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subfilter/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a[?(@.price>10)])] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subpaths/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "a": { 4 | "b": 3 5 | } 6 | }, 7 | { 8 | "a": { 9 | "b": 2 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subpaths/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a.b==3)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subpaths_deeply_nested/document.json: -------------------------------------------------------------------------------- 1 | [{"a": {"b": {"c": 3}}}, {"a": 3}, {"c": 3}, {"a": {"b": {"c": 2}}}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subpaths_deeply_nested/selector: -------------------------------------------------------------------------------- 1 | $[?(@.a.b.c==3)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subtraction/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 60}, {"key": 50}, {"key": 10}, {"key": -50}, {"key-50": -100}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_subtraction/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key-50==-100)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_tautological_comparison/document.json: -------------------------------------------------------------------------------- 1 | [1, 3, "nice", true, null, false, {}, [], -1, 0, ""] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_tautological_comparison/selector: -------------------------------------------------------------------------------- 1 | $[?(1==1)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_triple_equal/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key===42)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects/document.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "some": "some value" 4 | }, 5 | { 6 | "key": "value" 7 | } 8 | ] 9 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_after_dot_notation_with_wildcard_on_array_of_objects/selector: -------------------------------------------------------------------------------- 1 | $.*[?(@.key)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/filter_expression_with_value_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/filter_expression_with_value_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | {"id": 2, "more": [{"id": 2}, {"more": {"id": 2}}, {"id": {"id": 2}}, [{"id": 2}]]} 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..[?(@.id)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_false/document.json: -------------------------------------------------------------------------------- 1 | [1, 3, "nice", true, null, false, {}, [], -1, 0, ""] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_false/selector: -------------------------------------------------------------------------------- 1 | $[?(false)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_from_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | [{"key": [{"child": 1}, {"child": 2}]}, {"key": [{"child": 2}]}, {"key": [{}]}, {"key": [{"something": 42}]}, {}] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_from_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $[?(@..child)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_null/document.json: -------------------------------------------------------------------------------- 1 | [1, 3, "nice", true, null, false, {}, [], -1, 0, ""] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_null/selector: -------------------------------------------------------------------------------- 1 | $[?(null)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_true/document.json: -------------------------------------------------------------------------------- 1 | [1, 3, "nice", true, null, false, {}, [], -1, 0, ""] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_with_value_true/selector: -------------------------------------------------------------------------------- 1 | $[?(true)] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_without_parens/selector: -------------------------------------------------------------------------------- 1 | $[?@.key==42] 2 | -------------------------------------------------------------------------------- /queries/filter_expression_without_value/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key)] 2 | -------------------------------------------------------------------------------- /queries/function_sum/document.json: -------------------------------------------------------------------------------- 1 | {"data": [1,2,3,4]} 2 | -------------------------------------------------------------------------------- /queries/function_sum/selector: -------------------------------------------------------------------------------- 1 | $.data.sum() 2 | -------------------------------------------------------------------------------- /queries/parens_notation/document.json: -------------------------------------------------------------------------------- 1 | {"key": 1, "some": 2, "more": 3} 2 | -------------------------------------------------------------------------------- /queries/parens_notation/selector: -------------------------------------------------------------------------------- 1 | $(key,more) 2 | -------------------------------------------------------------------------------- /queries/recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | [{"a": {"b": "c"}}, [0, 1]] 2 | -------------------------------------------------------------------------------- /queries/recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $.. 2 | -------------------------------------------------------------------------------- /queries/recursive_descent_after_dot_notation/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/recursive_descent_after_dot_notation/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/recursive_descent_after_dot_notation/document.json: -------------------------------------------------------------------------------- 1 | {"some key": "value", "key": {"complex": "string", "primitives": [0, 1]}} 2 | -------------------------------------------------------------------------------- /queries/recursive_descent_after_dot_notation/selector: -------------------------------------------------------------------------------- 1 | $.key.. 2 | -------------------------------------------------------------------------------- /queries/recursive_descent_on_nested_arrays/document.json: -------------------------------------------------------------------------------- 1 | [[0], [1]] 2 | -------------------------------------------------------------------------------- /queries/recursive_descent_on_nested_arrays/selector: -------------------------------------------------------------------------------- 1 | $..* 2 | -------------------------------------------------------------------------------- /queries/root/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "another key": { 4 | "complex": [ 5 | "a", 6 | 1 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /queries/root/selector: -------------------------------------------------------------------------------- 1 | $ 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar/document.json: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar/selector: -------------------------------------------------------------------------------- 1 | $ 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar_false/document.json: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar_false/selector: -------------------------------------------------------------------------------- 1 | $ 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar_true/document.json: -------------------------------------------------------------------------------- 1 | true 2 | -------------------------------------------------------------------------------- /queries/root_on_scalar_true/selector: -------------------------------------------------------------------------------- 1 | $ 2 | -------------------------------------------------------------------------------- /queries/script_expression/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/script_expression/selector: -------------------------------------------------------------------------------- 1 | $[(@.length-1)] 2 | -------------------------------------------------------------------------------- /queries/union/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/union/selector: -------------------------------------------------------------------------------- 1 | $[0,1] 2 | -------------------------------------------------------------------------------- /queries/union_with_duplication_from_array/document.json: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /queries/union_with_duplication_from_array/selector: -------------------------------------------------------------------------------- 1 | $[0,0] 2 | -------------------------------------------------------------------------------- /queries/union_with_duplication_from_object/document.json: -------------------------------------------------------------------------------- 1 | {"a":1} 2 | -------------------------------------------------------------------------------- /queries/union_with_duplication_from_object/selector: -------------------------------------------------------------------------------- 1 | $['a','a'] 2 | -------------------------------------------------------------------------------- /queries/union_with_filter/document.json: -------------------------------------------------------------------------------- 1 | [{"key": 1}, {"key": 8}, {"key": 3}, {"key": 10}, {"key": 7}, {"key": 2}, {"key": 6}, {"key": 4}] 2 | -------------------------------------------------------------------------------- /queries/union_with_filter/selector: -------------------------------------------------------------------------------- 1 | $[?(@.key<3),?(@.key>6)] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/union_with_keys/selector: -------------------------------------------------------------------------------- 1 | $['key','another'] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_array_slice/document.json: -------------------------------------------------------------------------------- 1 | [{"c":"cc1","d":"dd1","e":"ee1"},{"c":"cc2","d":"dd2","e":"ee2"}] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_array_slice/selector: -------------------------------------------------------------------------------- 1 | $[:]['c','d'] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_bracket_notation/document.json: -------------------------------------------------------------------------------- 1 | [{"c":"cc1","d":"dd1","e":"ee1"},{"c":"cc2","d":"dd2","e":"ee2"}] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_bracket_notation/selector: -------------------------------------------------------------------------------- 1 | $[0]['c','d'] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_dot_notation_with_wildcard/document.json: -------------------------------------------------------------------------------- 1 | [{"c":"cc1","d":"dd1","e":"ee1"},{"c":"cc2","d":"dd2","e":"ee2"}] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_dot_notation_with_wildcard/selector: -------------------------------------------------------------------------------- 1 | $.*['c','d'] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_recursive_descent/ALLOW_UNORDERED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/queries/union_with_keys_after_recursive_descent/ALLOW_UNORDERED -------------------------------------------------------------------------------- /queries/union_with_keys_after_recursive_descent/document.json: -------------------------------------------------------------------------------- 1 | [{"c":"cc1","d":"dd1","e":"ee1"}, {"c": "cc2", "child": {"d": "dd2"}}, {"c": "cc3"}, {"d": "dd4"}, {"child": {"c": "cc5"}}] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_after_recursive_descent/selector: -------------------------------------------------------------------------------- 1 | $..['c','d'] 2 | -------------------------------------------------------------------------------- /queries/union_with_keys_on_object_without_key/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "value", 3 | "another": "entry" 4 | } 5 | -------------------------------------------------------------------------------- /queries/union_with_keys_on_object_without_key/selector: -------------------------------------------------------------------------------- 1 | $['missing','key'] 2 | -------------------------------------------------------------------------------- /queries/union_with_numbers_in_decreasing_order/document.json: -------------------------------------------------------------------------------- 1 | [1,2,3,4,5] 2 | -------------------------------------------------------------------------------- /queries/union_with_numbers_in_decreasing_order/selector: -------------------------------------------------------------------------------- 1 | $[4,1] 2 | -------------------------------------------------------------------------------- /queries/union_with_repeated_matches_after_dot_notation_with_wildcard/document.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": [ 3 | "string", 4 | null, 5 | true 6 | ], 7 | "b": [ 8 | false, 9 | "string", 10 | 5.4 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /queries/union_with_repeated_matches_after_dot_notation_with_wildcard/selector: -------------------------------------------------------------------------------- 1 | $.*[0,:5] 2 | -------------------------------------------------------------------------------- /queries/union_with_slice_and_number/document.json: -------------------------------------------------------------------------------- 1 | [1,2,3,4,5] 2 | -------------------------------------------------------------------------------- /queries/union_with_slice_and_number/selector: -------------------------------------------------------------------------------- 1 | $[1:3,4] 2 | -------------------------------------------------------------------------------- /queries/union_with_spaces/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third"] 2 | -------------------------------------------------------------------------------- /queries/union_with_spaces/selector: -------------------------------------------------------------------------------- 1 | $[ 0 , 1 ] 2 | -------------------------------------------------------------------------------- /queries/union_with_wildcard_and_number/document.json: -------------------------------------------------------------------------------- 1 | ["first", "second", "third", "forth", "fifth"] 2 | -------------------------------------------------------------------------------- /queries/union_with_wildcard_and_number/selector: -------------------------------------------------------------------------------- 1 | $[*,1] 2 | -------------------------------------------------------------------------------- /src/canonical_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import json 4 | 5 | def main(): 6 | try: 7 | j = json.loads(sys.stdin.read()) 8 | except Exception as e: 9 | print(e) 10 | sys.exit(1) 11 | 12 | print(json.dumps(j, sort_keys=True)) 13 | 14 | if __name__ == '__main__': 15 | sys.exit(main()) 16 | -------------------------------------------------------------------------------- /src/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir"/.. 7 | 8 | docker rmi json-path-comparison || true 9 | find ./implementations -type d -name "build" | xargs rm -r 10 | # This removes checked in artifacts, so this needs a fresh new build to restore 11 | rm -rf build docs regression_suite bug_reports 12 | -------------------------------------------------------------------------------- /src/docker_env_file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cburgmer/json-path-comparison/a81e868cdd2445fad99ef7bf90942715d502f04a/src/docker_env_file.txt -------------------------------------------------------------------------------- /src/oneliner_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import json 4 | from collections import OrderedDict 5 | 6 | def main(): 7 | j = json.loads(sys.stdin.read(), object_pairs_hook=OrderedDict) 8 | print(json.dumps(j)) 9 | 10 | if __name__ == '__main__': 11 | sys.exit(main()) 12 | -------------------------------------------------------------------------------- /src/pretty_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import json 4 | from collections import OrderedDict 5 | 6 | def main(): 7 | j = json.loads(sys.stdin.read(), object_pairs_hook=OrderedDict) 8 | print(json.dumps(j, indent=2)) 9 | 10 | if __name__ == '__main__': 11 | sys.exit(main()) 12 | -------------------------------------------------------------------------------- /src/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | cd "$script_dir"/.. 7 | 8 | find ./implementations -name "upgrade.sh" | xargs -n1 -I% sh -c '%' 9 | -------------------------------------------------------------------------------- /src/with_docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | readonly script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | readonly target_image=json-path-comparison 6 | 7 | docker build -t "$target_image" "$script_dir" 8 | 9 | docker run --env-file="${script_dir}/docker_env_file.txt" --rm -v "$(pwd):/json-path-comparison" -w "/json-path-comparison" -i "$target_image" "$@" 10 | -------------------------------------------------------------------------------- /src/wrap_in_docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | echo "Please use ./src/with_docker.sh instead" 5 | exit 1 6 | --------------------------------------------------------------------------------