shamblett / cbor

A CBOR implementation for Dart
MIT License
36 stars 15 forks source link

Any plans to support custom types? #61

Open isoos opened 1 month ago

isoos commented 1 month ago

I think CBOR specification allows the definition of custom types. Do you have any plan to support them?

shamblett commented 1 month ago

This is not part of RFC 8949 that I can see, it seems to be documented here as part of the CBOR2 Python library so at the moment no, there is no plan to support this functionality.

isoos commented 1 month ago

Right, makes sense. So, if I have Uint16List or similar structure, the recommendation is to convert it to Uint8List and then CborBytes, right?

shamblett commented 1 month ago

Not sure you need to convert it to Uint8List, CborBytes takes a List so you should be OK with UInt16List as is.