mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-18 02:21:30 +00:00
Results do not match other implementations - js unit test
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "jsonpath_lib"
|
name = "jsonpath_lib"
|
||||||
version = "0.2.0"
|
version = "0.2.2"
|
||||||
authors = ["Changseok Han <freestrings@gmail.com>"]
|
authors = ["Changseok Han <freestrings@gmail.com>"]
|
||||||
|
|
||||||
description = "It is JsonPath engine written in Rust. it provide a similar API interface in Webassembly and Javascript also. - Webassembly Demo: https://freestrings.github.io/jsonpath"
|
description = "It is JsonPath engine written in Rust. it provide a similar API interface in Webassembly and Javascript also. - Webassembly Demo: https://freestrings.github.io/jsonpath"
|
||||||
|
@ -14,7 +14,7 @@ exclude = ["artifacts.json", "index.node"]
|
|||||||
neon-build = "0.2.0"
|
neon-build = "0.2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
jsonpath_lib = "0.2.0"
|
jsonpath_lib = "0.2.2"
|
||||||
#jsonpath_lib = { path = "../../" }
|
#jsonpath_lib = { path = "../../" }
|
||||||
neon = "0.2.0"
|
neon = "0.2.0"
|
||||||
neon-serde = "0.1.1"
|
neon-serde = "0.1.1"
|
||||||
|
@ -797,4 +797,13 @@ describe('README test', () => {
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('ISSUE test', () => {
|
||||||
|
it('Results do not match other implementations #6', (done) => {
|
||||||
|
let result = jsonpath.select(["first", "second"], "$[:]");
|
||||||
|
if (JSON.stringify(result) === JSON.stringify(["first", "second"])) {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
@ -377,7 +377,7 @@ impl Parser {
|
|||||||
debug!("#range_to");
|
debug!("#range_to");
|
||||||
match tokenizer.peek_token() {
|
match tokenizer.peek_token() {
|
||||||
Ok(Token::CloseArray(_)) => {
|
Ok(Token::CloseArray(_)) => {
|
||||||
return Ok(Self::node(ParseToken::Range(None, None)))
|
return Ok(Self::node(ParseToken::Range(None, None)));
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "jsonpath-wasm"
|
name = "jsonpath-wasm"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
authors = ["Changseok Han <freestrings@gmail.com>"]
|
authors = ["Changseok Han <freestrings@gmail.com>"]
|
||||||
description = "It is Webassembly version of jsonpath_lib that is JsonPath engine written in Rust - Demo: https://freestrings.github.io/jsonpath"
|
description = "It is Webassembly version of jsonpath_lib that is JsonPath engine written in Rust - Demo: https://freestrings.github.io/jsonpath"
|
||||||
keywords = ["jsonpath", "json", "webassembly", "parsing", "rust"]
|
keywords = ["jsonpath", "json", "webassembly", "parsing", "rust"]
|
||||||
|
@ -821,4 +821,13 @@ describe('README test', () => {
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('ISSUE test', () => {
|
||||||
|
it('Results do not match other implementations #6', (done) => {
|
||||||
|
let result = jsonpath.select(["first", "second"], "$[:]");
|
||||||
|
if (JSON.stringify(result) === JSON.stringify(["first", "second"])) {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
Reference in New Issue
Block a user