kotlinx.serialization
kotlinx.serialization copied to clipboard
Add support for unsigned numbers arrays
What is your use-case and why do you need this feature?
Use-cases for U[X]Array, are similar as for [X]Array.
Describe the solution you'd like
Add serializers for UByteArray, UShortArray, UIntArray and ULongArray.
val bytes = Json.decodeFromString<UByteArray>("[0, 127, 255]")
prtintln(bytes.contentToString()) // [0, 127, 255]
I can try to implement this feature myself if it is needed
@osipxd, thanks for the offer, but this improvement requires changing not only the serialization runtime, but also the plugin. The feature will be available after several Kotlin releases.