Closed slipdef closed 4 years ago
The CBOR library encodes certain double
values in a shorter format, namely the half-float format supported by CBOR, if that can be done without loss. This seems to be the case here. However, my CBOR library works correctly here; the issue is with your Kotlin serialization library, which appears not to support decoding the half-float format. You should file an issue for that library.
Describe the bug
Can't deserialize CBOR bytes using https://github.com/Kotlin/kotlinx.serialization if serialized object has a field with double value without fractional part.
To Reproduce
C#
Kotlin
Works:
However it worked fine with 4.0 beta1. Tested on all versions after 4.0 beta1 - crashes with that exception.
Environment