pub fn to_vec<T: Serialize>(value: &T) -> Result<Vec<u8>, JsonError>
Serialize a value to a JSON byte vector.
Uses pre-allocated buffer with estimated capacity for better performance.