to_vec

Function to_vec 

Source
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>, JsonError>
where T: Serialize,
Expand description

Serialize a value to a JSON byte vector.

Uses pre-allocated buffer with estimated capacity for better performance.