pub enum JsonNode {
Null(Span),
Bool(bool, Span),
Number(f64, String, Span),
String(String, Span),
Array(Vec<JsonNode>, Span),
Object(Vec<KeyValuePair>, Span),
}Expand description
The JSON value tree returned by a successful parse. Each variant carries the byte-offset range (Span) from the original source code for accurate syntax highlighting, navigation, and error reporting.
Variants§
Null(Span)
A JSON null value.
Bool(bool, Span)
A JSON boolean value (true or false).
Number(f64, String, Span)
A JSON number, storing both its evaluated f64 representation and
its original raw string for lossless round-trip formatting.
String(String, Span)
A JSON string value.
Array(Vec<JsonNode>, Span)
A JSON array value.
Object(Vec<KeyValuePair>, Span)
A JSON object value, represented as a list of key-value pairs to preserve insertion order.
Implementations§
Trait Implementations§
impl StructuralPartialEq for JsonNode
Auto Trait Implementations§
impl Freeze for JsonNode
impl RefUnwindSafe for JsonNode
impl Send for JsonNode
impl Sync for JsonNode
impl Unpin for JsonNode
impl UnsafeUnpin for JsonNode
impl UnwindSafe for JsonNode
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