jsonpath_lib
Rust
버전 JsonPath 구현으로 Webassembly
와 Javascript
에서도 유사한 API 인터페이스를 제공 한다.
It is JsonPath JsonPath engine written in Rust
. it provide a similar API interface in Webassembly
and Javascript
too.
- Webassembly Demo
- NPM jsonpath-wasm - webassembly
Rust API
jsonpath_lib crate
Go to jsonpath_lib
creates.io
Rust - jsonpath::Selector struct
Rust - jsonpath::SelectorMut struct
Rust - jsonpath::select(json: &serde_json::value::Value, jsonpath: &str)
Rust - jsonpath::select_as_str(json_str: &str, jsonpath: &str)
Rust - jsonpath::select_as(json_str: &str, jsonpath: &str)
Rust - jsonpath::PathCompiled::compile(jsonpath: &str)
Rust - jsonpath::selector(json: &serde_json::value::Value)
Rust - jsonpath::selector_as(json: &serde_json::value::Value)
Rust - jsonpath::delete(value: &Value, path: &str)
Rust - jsonpath::replace_with Value>(value: &Value, path: &str, fun: &mut F)
Rust - Other Examples
Javascript API
npm package
jsonpath-wasm
Goto jsonpath-wasm
npmjs.org
jsonpath-wasm
wasm-bindgen
리턴 타입 제약 때문에 빌더 패턴은 지원하지 않는다.
It does not support builder-pattern
due to the return type
restriction of wasm-bindgen
.
빌더 패턴 제약은 Selector class
와 동일하다.
Javascript - jsonpath.select(json: string|object, jsonpath: string)
Javascript - jsonpath.compile(jsonpath: string)
Javascript - jsonpath.selector(json: string|object)
Javascript - jsonpath.deleteValue(json: string|object, path: string)
Javascript - jsonpath.replaceWith(json: string|object, path: string, fun: function(json: object) => json: object
Javascript - Other Examples