Open d-r-q opened 5 years ago
There are some strange behavior of numbers on js - objects that at compile time has type Byte, at run time are Int. And due to this "feature" custom serialization doesn't. I suggest, that there're more such issues, so decide to migrate to kotlinx serialization and move this issue to mpp project
Look like there is no magic, and Kotlin serialization also cannot handle the problem. The problem is that in Eav have no meta information about value type and there is no sound way to determine value type by value itself. To mitigate the problem type meta information should be introduced in Eav someway, but Eavs, are actually used almost everywhere, so I decided to postpone the change to clean up stage, to ensure, that new version for sure works for multiplatform.
Actual behavior: Eavs are serialized to trx log via custom serialization.
Quality for this serialization is unclear and it's more difficult to implement support of nested map attributes using custom serialization.
Consider switch to kotlinx.serialization/CBOR.
Comparison matrix:
kotlinx advantages: