#serde-json #spans #serialization #error #track #better #origin

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

#1054 in Encoding

Download history 914/week @ 2023-11-20 2206/week @ 2023-11-27 2509/week @ 2023-12-04 1662/week @ 2023-12-11 3180/week @ 2023-12-18 1600/week @ 2023-12-25 2342/week @ 2024-01-01 2184/week @ 2024-01-08 2450/week @ 2024-01-15 3011/week @ 2024-01-22 2235/week @ 2024-01-29 2157/week @ 2024-02-05 2246/week @ 2024-02-12 2469/week @ 2024-02-19 2463/week @ 2024-02-26 2971/week @ 2024-03-04

10,172 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.4–1MB
~20K SLoC