Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 1.26 KB

CONTRIBUTING.md

File metadata and controls

42 lines (24 loc) · 1.26 KB

Contribute

Add an implementation

Copy a comparable setup in ./implementations and adapt. Be aware that some implementations decide to return queries for single values as scalars, compare ./implementations/Clojure_json-path.

Test the implementation's ninja build script via (using Clojure as an example):

ninja -f implementations/Clojure_json-path/build.ninja

Test a query by running (again Clojure as example):

./src/query_implementation.sh queries/array_slice implementations/Clojure_json-path

Add a new query

Add a new directory under ./queries and give it a selector and document.json.

Test a query against an implementation (Goessner's JavaScript as example):

./src/query_implementation.sh queries/THE_NEW_QUERY implementations/JavaScript_Goessner

See "One-off comparisons" in the README.md to execute against all implementations.

QUERY_NAMING_PATTERN.md explains what is a good query name.

Upgrade implementations

Some implementations can be automatically upgraded:

./src/with_native.sh ./src/upgrade.sh

(Or use ./src/with_docker.sh if you prefer Docker.)

Clean the build to re-run from scratch

./src/clean.sh