pub fn to_json(el: &TLVElement<'_>, shape: Shape) -> Result<Value, ConvertError>Expand description
Decode a TLV element to JSON, naming structure fields from shape where
it has them.
Integers are JSON numbers (exact up to 64 bits), octet strings lowercase hex, structures objects keyed by field name (or tag number for a field the schema does not know), lists and arrays JSON arrays.