encode
Serializes a DataItem into its Concise Diagnostic Notation text representation.
Return
The formatted CDN string.
Parameters
item
The DataItem to encode.
options
Options controlling formatting (e.g. pretty printing, byte string format).
fun encode(encodedCbor: ByteArray, options: CdnGeneratorOptions = CdnGeneratorOptions.Default): String
Decodes encoded CBOR bytes and serializes them into Concise Diagnostic Notation text.
Return
The formatted CDN string.
Parameters
encodedCbor
The raw CBOR bytes.
options
Options controlling formatting.
Serializes a DataItem into its CDN text representation using a custom extension registry.
Decodes CBOR bytes and serializes them into CDN text representation using a custom extension registry.