Expand description
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.)
Re-exports§
pub use spanned::Spanned;
Modules§
- spanned
- Spanned and aliases thereof - spanned::{Value, Null, Bool, Num[ber], Str[ing], Obj[ect], Span, Array}
Structs§
- Map
- A basic un-Spanned object/map, with Spanned children.
- Settings
- Deserialization/parsing settings
- Stream
Deserializer - Iterator that deserializes a stream into multiple JSON values.
Enums§
- Value
- A basic un-Spanned value, with Spanned children.
Unless you want to
match
it, you probably want spanned::Value.
Traits§
- Error
Ext - Utility methods extending serde_json::Error
Functions§
- from_
slice - Read json from a slice of in-memory bytes, with default Settings
- from_
slice_ with_ settings - Read json from a slice of in-memory bytes, with explicit Settings
- from_
str - Read json from an in-memory string, with default Settings
- from_
str_ with_ settings - Read json from an in-memory string, with explicit Settings