https://github.com/maulingmonkey/json-spanned-value
Track the origin of your json values for better error reporting!
https://github.com/maulingmonkey/json-spanned-value
encoding json rust serde serialization spans
Last synced: over 1 year ago
JSON representation
Track the origin of your json values for better error reporting!
- Host: GitHub
- URL: https://github.com/maulingmonkey/json-spanned-value
- Owner: MaulingMonkey
- License: other
- Created: 2020-09-28T20:32:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T21:22:33.000Z (over 5 years ago)
- Last Synced: 2024-10-14T04:22:30.442Z (over 1 year ago)
- Topics: encoding, json, rust, serde, serialization, spans
- Language: Rust
- Homepage:
- Size: 99.6 KB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# json-spanned-value
[](https://github.com/MaulingMonkey/json-spanned-value)
[](https://crates.io/crates/json-spanned-value)
[](https://docs.rs/json-spanned-value)
[![%23![forbid(unsafe_code)]](https://img.shields.io/github/search/MaulingMonkey/json-spanned-value/%23%21%5Bforbid%28unsafe_code%29%5D%2bextension%3Ars?color=green&label=%23![forbid(unsafe_code)])](https://github.com/MaulingMonkey/json-spanned-value/search?q=forbid%28unsafe_code%29+extension%3Ars)
[](https://gist.github.com/MaulingMonkey/c81a9f18811079f19326dac4daa5a359#minimum-supported-rust-versions-msrv)
[](https://github.com/MaulingMonkey/json-spanned-value)
[](https://travis-ci.com/MaulingMonkey/json-spanned-value)
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](LICENSE-APACHE) or [MIT license](LICENSE-MIT) 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.
[serde_json]: https://docs.rs/serde_json/
[toml]: https://docs.rs/toml/
[toml-spanned-value]: https://docs.rs/toml-spanned-value/
[json-spanned-value]: https://docs.rs/json-spanned-value/