pub fn encode_to_vec( shape: Shape, value: &Value, max_len: usize, ) -> Result<Vec<u8>, ConvertError>
Encode a JSON value as one anonymous TLV element, as from_json does, into a new buffer of at most max_len bytes.
from_json
max_len