cbor icon indicating copy to clipboard operation
cbor copied to clipboard

Allow to define Map type while decoding

Open muzzammilshahid opened this issue 1 year ago • 1 comments

The Cbor serializer currently can't specify the types of keys and values for a Map during decoding. It would be beneficial to introduce a feature like:

CborSimpleCodec cborSimpleCodec = CborSimpleCodec(mapType: Type);

For reference, something like https://github.com/ugorji/go/blob/07c54c229a5acac2d5bc739820a3ecc5411b7b33/codec/decode.go#L216

muzzammilshahid avatar Apr 27 '24 11:04 muzzammilshahid

Maybe, I need to look further, need to be careful of outputting as json as json only has map key types as string of course.

shamblett avatar Apr 28 '24 10:04 shamblett