Skip to main content

encode_to_vec

Function encode_to_vec 

Source
pub fn encode_to_vec(
    shape: Shape,
    value: &Value,
    max_len: usize,
) -> Result<Vec<u8>, ConvertError>
Expand description

Encode a JSON value as one anonymous TLV element, as from_json does, into a new buffer of at most max_len bytes.