MoshiPack
MoshiPack copied to clipboard
Msgpack format tag not yet supported: 0x3C
Hi Dave,
Thanks for the cool project. I have some issues with Kotlin messages decoding.
Expected behaviour
Correct data processing.
Actual behaviour
'Msgpack format tag not yet supported: 0x3C' error
Steps to reproduce behaviour
I'm trying to pack data in Kotlin, and it packs and unpacks ok:
data class PD(val timestamp: String, val corr_ms: Int, val rssi: Int)
val passings: Array <PD> = arrayOf(PD("2019-02-08T23:44:15.000+2", 0, -50),
PD("2019-02-11T21:12:15.000+2", 1, -40),
PD("2019-02-14T20:32:15.000+2", 2, -55))
data class P(val id: Int, val passings: Array<PD>)
val data = P(1, passings)
val bytes = MoshiPack().packToByteArray(data)
But when I try to send the same data from a Python application to Kotlin, I have a error.
import msgpack
data = {'passings': [{'timestamp': '2019-02-08T23:44:15.000+2', 'rssi': -50, 'corr_ms':0}],
'id': 7 }
data_out = msgpack.packb(data, use_bin_type=True)
Where is the difference? Setting use_bin_type to False temporary solving the problem, but according to manual, this mode is deprecated.
Thanks.
What is 0x3C supposed to be? It's not in the spec, afaict.
(disclaimer: I'm not using the library yet.)