This crate is used to publish the JSONPath parsing and query functionality of the Rust serde_json_path
crate into WASM, to be used in a browser.
It is used at serdejsonpath.live.
const obj = {
"foo": [
"bar",
"baz"
]
};
// Being a WASM package, serde-json-path loads asynchronously:
import("serde-json-path")
.then(({ JsonPath })=> {
const path = JsonPath.parse("$.foo.*");
const nodes = path.query(obj);
// nodes -> ["bar", "baz"]
})
Build with wasm-pack build
wasm-pack build
Publish to NPM with wasm-pack publish
wasm-pack publish
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.