···11+test-vectors
22+============
33+44+This repo collects some simple test vectors in machine-processable form.
55+66+appendix_a.json
77+---------------
88+99+All examples in Appendix A of RFC 7049, encoded as a JSON array.
1010+1111+Each element of the test vector is a map (JSON object) with the keys:
1212+1313+- cbor: a base-64 encoded CBOR data item
1414+- hex: the same CBOR data item in hex encoding
1515+- roundtrip: a boolean that indicates whether a generic CBOR encoder
1616+ would _typically_ produce identical CBOR on re-encoding the decoded
1717+ data item (your mileage may vary)
1818+- decoded: the decoded data item if it can be represented in JSON
1919+- diagnostic: the representation of the data item in CBOR diagnostic notation, otherwise
2020+2121+To make use of the cases that need diagnostic notation, a diagnostic
2222+notation printer is usually all that is needed: decode the CBOR, print
2323+the decoded data item in diagnostic notation, and compare.
2424+2525+(Note that the diagnostic notation uses full decoration for the
2626+indefinite length byte string, while the decoded indefinite length
2727+text string represented in JSON necessarily doesn't.)