#json #spans #error-reporting #serde #serialization #serde-json

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

#1003 in Encoding

Download history 2104/week @ 2024-07-21 2401/week @ 2024-07-28 2258/week @ 2024-08-04 1303/week @ 2024-08-11 2066/week @ 2024-08-18 2349/week @ 2024-08-25 1789/week @ 2024-09-01 3362/week @ 2024-09-08 2792/week @ 2024-09-15 2959/week @ 2024-09-22 2787/week @ 2024-09-29 4342/week @ 2024-10-06 3783/week @ 2024-10-13 5027/week @ 2024-10-20 3893/week @ 2024-10-27 2991/week @ 2024-11-03

15,910 downloads per month
Used in minecraft-whitelist-valid…

Apache-2.0 OR MIT

63KB
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–1.2MB
~23K SLoC