Thread
#serialization
    Sam

    Sam

    1 year ago
    Hello, good evening everyone. I have a plan replace Gson to Serialization. But My project has many modules, they are using Moshi and Gson in Core module ( base module for all of Features) So What are the pros and cons of using Serialization library? Is there anything I need to keep in mind when switching from Gson to Serialization? Thanks.
    Big Chungus

    Big Chungus

    1 year ago
    Kotlinx.Serialization doesn't use reflection and works on MPP projects. Downsides are that only Json format is currently stable and somethimes you'll need to massage it a bit on more complex object serialization/deserialization Overall I personally am a huge fan of kotlinx.serialization when compared with Gson or Jackson
    Sam

    Sam

    1 year ago
    How’s about speed? Do you know any benchmark on Serialization?
    Dariusz Kuc

    Dariusz Kuc

    1 year ago
    kotlinx.serialization is in many ways simpler than gson/moshi/jackson yet in others pretty limited - since it relies on compiler it has hard time working with some dynamic map structures (ie handling Map<String, Any> is pretty problematic...)
    Colton Idle

    Colton Idle

    1 year ago
    Here's a good talk on json and serialization including all of the libraries you mentioned by one of the authors of gson and moshi:

    https://youtu.be/1PwdqkKDCSo?t=1807

    Sam

    Sam

    1 year ago
    Many Thanks.