dkunzler / esperandro

Easy SharedPreference Engine foR ANDROid
Other
180 stars 14 forks source link

Serializer for Kotlinx serialization library #64

Open wbervoets opened 4 years ago

wbervoets commented 4 years ago

Hi,

I was wondering if it is possible to create a serializer that delegates serialization/deserialisation to the Kotlinx Serialization library?

Wim

dkunzler commented 4 years ago

From what I read this needs a kotlin class. Since I'm generating a wrapper class on the fly (to mitigate some problems with Generics that some JSON Serializers have) I think that at the moment this will not be possible. If you know how to serialize plain Java Classes with this kotlinx lib feel free to give me an example. Then I will gladly implement something like that.

agramian commented 3 years ago

I'm not sure exactly what you require to get this implemented however I just came upon this issue and it may be possible to leverage the Android SharedPreferences serialization project which is mentioned in the documentation for Kotlinx Serialization here.