pub enum JsonValue {
Null,
Boolean(bool),
Integer(i64),
Number(f64),
String(String),
Array(Vec<JsonValue>),
Object(Vec<JsonMember>),
}Expand description
JSON data represented independently of any application schema.
Its codec uses the ordinary schema-neutral Value variants. JSON null is
Value::Unit, arrays are Value::List, and objects are
Value::Record. Protocol bytes have no JSON representation and decoding
a tree containing Value::Bytes is rejected.
Variants§
Null
JSON null.
Boolean(bool)
A JSON boolean.
Integer(i64)
An interoperable integral JSON number.
Number(f64)
A finite non-integral JSON number.
String(String)
A JSON string.
Array(Vec<JsonValue>)
A JSON array.
Object(Vec<JsonMember>)
A JSON object. Duplicate member names are rejected while encoding.
Trait Implementations§
impl StructuralPartialEq for JsonValue
Auto Trait Implementations§
impl Freeze for JsonValue
impl RefUnwindSafe for JsonValue
impl Send for JsonValue
impl Sync for JsonValue
impl Unpin for JsonValue
impl UnsafeUnpin for JsonValue
impl UnwindSafe for JsonValue
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