#json #serde #serialization #spans

json-spanned-value

Track the origin of your json values for better error reporting!

7 releases

0.2.2 Oct 10, 2020
0.2.1 Oct 1, 2020
0.2.0 Sep 30, 2020
0.1.3 Sep 30, 2020

#185 in Encoding

Download history 7/week @ 2021-01-18 4/week @ 2021-02-01 63/week @ 2021-02-08 230/week @ 2021-02-15 1345/week @ 2021-02-22 1314/week @ 2021-03-01 1359/week @ 2021-03-08 1354/week @ 2021-03-15 1680/week @ 2021-03-22 1977/week @ 2021-03-29 2024/week @ 2021-04-05 2229/week @ 2021-04-12 2319/week @ 2021-04-19 2422/week @ 2021-04-26 1584/week @ 2021-05-03

1,046 downloads per month

Apache-2.0 OR MIT

61KB
781 lines

json-spanned-value

GitHub crates.io docs.rs %23![forbid(unsafe_code)] rust: 1.46.0 License Build Status

Track the origin of your json values for better error reporting! The toml crate has toml-spanned-value for this. serde_json now has json-spanned-value.

The basic crates provide users with a Value type that can be used for custom parsing logic. However, this type doesn't support span information. In some cases it's possible to extract line/column information out of error messages, but that's awkward and error prone - often reporting errors on the next line (e.g. where the seek position of the underlying reader has skipped to.)

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.5–0.8MB
~17K SLoC