kotlinx.serialization.cbor.CborDecodingException: Expected byte bf, but found a2
See original GitHub issueDescribe the bug Can’t deserialize data serialized with https://github.com/peteroupc/CBOR-Java on a server side. Got the following exception: kotlinx.serialization.cbor.CborDecodingException: Expected byte bf, but found a2
To Reproduce
val test = SomeClass()
test.prop = 99
var bytes = CBORObject.FromObject(test).EncodeToBytes()
Cbor.load<SomeClass>(bytes)
Expected behavior Should just work. It works well on iOS side when deserializing using this lib https://github.com/myfreeweb/SwiftCBOR. So I post here instead of CBOR-Java repo.
Environment
- Kotlin version: 1.3.41
- Library version: 0.11.1
- Kotlin platforms: JVM
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
kotlinx.serialization.cbor.CborDecodingException: Expected ...
I found a way by myself, the errors was two basically: the override val descriptor: SerialDescriptor variable was setted to recognize String ...
Read more >What is wrong w this CBOR code 1 0 0 RC kotlin ver 1 4 10 Th
kotlinx.serialization.cbor.internal.CborDecodingException: Expected start of array, but found BF @Serializable sealed class BaseClass() @Serializable data ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, looking forward for new kotlinx.serialization release. It’s quite a pain to build it from sources now.