We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Illegal JSON like 1@ will be normally parsed into Number(1) instead of returning an Error.
1@
Number(1)
This behavior is different from the regular serde_json crate.
serde_json
Test code:
use serde::Deserialize; use serde_json::Value; fn main() { let json = "1@"; let data = json.as_bytes(); let v = serde_json::from_slice::<Value>(data); println!("serde-json: {:?}", v); let mut deserializer = serde_json::Deserializer::from_slice(data); deserializer.disable_recursion_limit(); let deserializer = serde_stacker::Deserializer::new(&mut deserializer); let v = Value::deserialize(deserializer); println!("serde-stacker: {:?}", v); }
Output:
serde-json: Err(Error("trailing characters", line: 1, column: 2)) serde-stacker: Ok(Number(1))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Illegal JSON like
1@
will be normally parsed intoNumber(1)
instead of returning an Error.This behavior is different from the regular
serde_json
crate.Test code:
Output:
The text was updated successfully, but these errors were encountered: