0

How to add TAG on CBOR object and ByteString using kotlinx.serialization

Example :- 24(h'A367646F635479706564646F63326A6E616D65537061636573A2666E616D653231A2626262F4626363F4666E616D653232A2627878F4627979F46B72657175657374496E666FAA644B6579306656616C756530644B6579316656616C756531644B6579326656616C756532644B6579336656616C756533644B6579346656616C756534644B6579356656616C756535644B6579366656616C756536644B6579376656616C756537644B6579386656616C756538644B6579396656616C756539')

In this example i have tagged byteString with 24.

Is there any way to achive using kotlinx.serialization library in kotlin multiplatform

  • I had a question about the tag. I am trying to find examples of tag 24 online, but could not find much. Tag 24 is supposed to contain an encoded CBOR data item. In your example, what is the encoded item 'A36..' correspond to? – RohitG Feb 13 '21 at 15:51
  • 1
    'Á36..' this one is encoded CBOr map for {"docType": "doc2", "nameSpaces": {"name21": {"bb": false, "cc": false}, "name22": {"xx": false, "yy": false}}, "requestInfo": {"Key0": "Value0", "Key1": "Value1", "Key2": "Value2", "Key3": "Value3", "Key4": "Value4", "Key5": "Value5", "Key6": "Value6", "Key7": "Value7", "Key8": "Value8", "Key9": "Value9"}}. We can achieve the TAG in other CBOR libs but i am looking in KMP. – Amandeep Tomar Feb 15 '21 at 11:35

0 Answers0