pub struct JsonValue { /* private fields */ }Expand description
Owned parsed JSON value, holding the structurally-tagged byte form
documented in the module header. Backs the
JsonValueRef navigator. There is no width / depth / count
ceiling. alloc-gated — the pipeline binds the borrowed
JsonCarrier handle.
Implementations§
Source§impl JsonValue
impl JsonValue
Sourcepub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
pub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
Parse raw JSON bytes into a typed JsonValue (RFC 8259 syntax,
escape decoding, UAX #15 NFC normalization, JCS number
canonicalization).
§Errors
validUtf8Json— input is not valid UTF-8 JSON.depthBound— nesting exceeds theMAX_JSON_DEPTHstack-safety bound.
Sourcepub fn tagged_bytes(&self) -> &[u8] ⓘ
pub fn tagged_bytes(&self) -> &[u8] ⓘ
Borrow the structurally-tagged byte serialization (the runtime
form; not the canonical bytes ψ₉ hashes — derive those via
canonicalize).
Trait Implementations§
impl Eq for JsonValue
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