kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Support encoding/decoding ByteArrays in parameterized types as ByteStrings.

Open christiandeange opened this issue 2 years ago • 2 comments

This is effectively accomplished by propagating the value of decodeByteArrayAsByteString, as determined by reading the annotations on the element, down to any CborReaders for map- or list-like types. Any ByteArray types listed as direct or indirect type argument for these parameterized types will be parsed in the same manner.

Solves #2037.

christiandeange avatar Jul 30 '23 07:07 christiandeange

Hi, am I correct that your decodeByteArrayAsByteString feature is the same as alwaysUseByteString from #2412?

sandwwraith avatar Dec 15 '23 16:12 sandwwraith

Yes if that PR is merged, I think this one is relatively redundant.

christiandeange avatar Dec 15 '23 16:12 christiandeange