I'm trying out kotlinx.serializaion
, and finding the lack of default support for common types a bit off-putting. Take for example java.util.UUID
; even applying @ContextualSerialization
, I get an error that the compiler can't locate an argument-less serializer for this type. Am I correct in assuming the recommended solution is to implement a custom serializer for UUID? Is there no way (or plan) to provide default serializers for common types as a quality-of-life feature?
Asked
Active
Viewed 123 times
4

Vadim Kotov
- 8,084
- 8
- 48
- 62

Rollie
- 4,391
- 3
- 33
- 55
-
i just asked myself the same question. I'm not sure if I understood it correctly, but maybe the commonplace option is not to use java citizens like `java.util.UUID` but kotlin-native citizens, such as `https://github.com/hfhbd/kotlinx-uuid`. – Hermann.Gruber Jul 06 '23 at 13:53