Thread
#serialization
    a

    Ayfri

    1 month ago
    Is there a way to create a
    JSONTransformingSerializer
    to replace all keys with a
    snake_case
    instead of a
    camelCase
    that works for any data class ?
    Dominaezzz

    Dominaezzz

    1 month ago
    Yes
    You just need to iterate over the keys to do the convertion.
    a

    Ayfri

    1 month ago
    But how do I make it to work for any class ? So I don't have to create a serializer for every classes I have ?
    Dominaezzz

    Dominaezzz

    1 month ago
    Ohhhhh. Yeah that's not possible yet. There's an open issue for it though.
    a

    Ayfri

    1 month ago
    Ah 😦 So I'll stick with having 100
    @SerialName
    for my classes x)