cbor_decode
[structured_message] 把 CBOR 字节流解码为 JSON,并给出逐字段结构拆解树(RFC 8949)。 【算法】CBOR 解码,定长(§3.2.1)与不定长(§3.2.2)均容忍; 要求单数据项且逐字节闭合(尾随字节即拒绝)。 【参数】
cbor_in_hex:CBOR 字节的十六进制字符串(1B~128KB) 【输出】decoded_json(bytes→{"hex":…}、tag→{"tag","value"}、 语义 tag→date_time/uuid 等标注形式)、decoded_type、decoded_length、 structure_tree(offset/header_len/total_len/major_type/length_form/rfc_note)、truncated、warnings。 【注意】structure_tree 超过 20000 节点或深度超 64 会截断并置 truncated=true;cbor2 对 tag 0/1/2/3 等有内置语义解码,wire 层形态以 structure_tree 为准。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cbor_in_hex | No | CBOR 字节的十六进制字符串(1B~128KB,单数据项且逐字节闭合) |