It is intended for use in testing, debugging, and other scenarios where a
human-readable representation of dCBOR is useful. It is not optimized for
performance and should not be used in production environments where binary
dCBOR is expected.
The primary functions provided are:
parseDcborItem: Parses a string in CBOR diagnostic notation into a Cbor object.
composeDcborArray: Composes a Cbor array from a slice of strings
representing dCBOR items in diagnostic notation.
composeDcborMap: Composes a Cbor map from a slice of strings
representing the key-value pairs in dCBOR diagnostic notation.
dCBOR Diagnostic Parser and Composer
This package provides tools for parsing and composing the CBOR diagnostic notation into dCBOR (deterministic CBOR) data items.
It is intended for use in testing, debugging, and other scenarios where a human-readable representation of dCBOR is useful. It is not optimized for performance and should not be used in production environments where binary dCBOR is expected.
The primary functions provided are:
parseDcborItem: Parses a string in CBOR diagnostic notation into aCborobject.composeDcborArray: Composes aCborarray from a slice of strings representing dCBOR items in diagnostic notation.composeDcborMap: Composes aCbormap from a slice of strings representing the key-value pairs in dCBOR diagnostic notation.Supported Types
true,falsenull0,1,-1,423.14,-2.5,Infinity,-Infinity,NaN"hello","🌎"2023-02-08,2023-02-08T15:30:45Z,1965-05-15h'68656c6c6f'b64'AQIDBAUGBwgJCg=='1234("hello"),5678(3.14)tag-name("hello"),tag-name(3.14)'1','isA'Unit,'','0'ur:date/cyisdadmlasgtapttl[1, 2, 3],["hello", "world"],[1, [2, 3]]{1: 2, 3: 4},{"key": "value"},{1: [2, 3], 4: 5}