pub struct JsonDocument<'s> { /* private fields */ }Expand description
JSON text parsed for evaluation. It borrows the text, for the strings that need no unescaping.
Implementations§
Source§impl<'s> JsonDocument<'s>
impl<'s> JsonDocument<'s>
Sourcepub fn parse(source: &'s str) -> Result<JsonDocument<'s>, JsonParseError>
pub fn parse(source: &'s str) -> Result<JsonDocument<'s>, JsonParseError>
Parses JSON text. As serde_json does, it rejects lone surrogates in \u escapes, numbers out of the range of a
double, nesting deeper than 127 levels and anything but whitespace after the value; of duplicate property
names, the last value is kept, at the position of the first.
Sourcepub fn root(&self) -> JsonDocumentValue<'_>
pub fn root(&self) -> JsonDocumentValue<'_>
The root value.
Trait Implementations§
Auto Trait Implementations§
impl<'s> Freeze for JsonDocument<'s>
impl<'s> RefUnwindSafe for JsonDocument<'s>
impl<'s> Send for JsonDocument<'s>
impl<'s> Sync for JsonDocument<'s>
impl<'s> Unpin for JsonDocument<'s>
impl<'s> UnsafeUnpin for JsonDocument<'s>
impl<'s> UnwindSafe for JsonDocument<'s>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more