範例
CBOR Decode: Can encode decimal
輸入
1.5Expected answer
Hexadecimal bytesf9 3e 00Can encode boolean false
輸入
falseExpected answer
Hexadecimal bytesf4Can encode boolean true
輸入
trueExpected answer
Hexadecimal bytesf5Can encode integer
輸入
15Expected answer
Hexadecimal bytes0fCan encode list
輸入
[0,1,2]Expected answer
Hexadecimal bytes83 00 01 02Can encode map
輸入
{"a":1,"b":2,"c":3}Expected answer
Hexadecimal bytesa3 61 61 01 61 62 02 61 63 03Can encode text
輸入
"Text"Expected answer
UTF-8 text · exact bytesdText