simd_json::value::owned

Function to_value_with_buffers

Source
pub fn to_value_with_buffers(
    s: &mut [u8],
    buffers: &mut Buffers,
) -> Result<Value>
Expand description

Parses a slice of bytes into a Value dom.

This function will rewrite the slice to de-escape strings. We do not keep any references to the raw data but re-allocate owned memory wherever required thus returning a value without a lifetime.

Passes in reusable buffers to reduce allocations.

ยงErrors

Will return Err if s is invalid JSON.