esensar / kotlinx-serialization-msgpack

MsgPack support for kotlinx.serialization -- msgpack.org[kotlinx.serialization]
https://www.ensarsarajcic.com/kotlinx-serialization-msgpack/
MIT License
44 stars 9 forks source link

Crashing due to integer deserialization #73

Closed AlirezaGhanbarinia closed 2 years ago

AlirezaGhanbarinia commented 2 years ago

As we use Go lang in server-side, we provides two type for integer considered as int32 (which is 4 bytes) and int64 (which is 8 bytes). I declared a custom deserializer and inside it I used try-catch to handle any exception but when deserialization, an exception is thrown and the source of the exception is the model class.

esensar commented 2 years ago

Could you give more information, or an example of payload? Part of stacktrace related to the library would be useful too. Thanks!

esensar commented 2 years ago

You can also try using 0.5.0 snapshot, which has more descriptive errors. I plan on releasing 0.5.0 soon to make that feature available.