Thread
#serialization
    a

    Adam S

    2 months ago
    I'm parsing some JSON API responses returns an empty object
    {}
    if a list is empty I've written a custom serializer to handle this, and set
    contextual(List::class)
    in the
    SerializersModule
    , but I forgetting to add
    @Contextual
    to all the list properties. Is there a way to hardcode 'use my
    EmptyListEmptyObjectSerializer
    for all List<>s' in a
    SerializersModule
    ?
    I think these are the options, but I haven't tested them all. It's confusing what the differences between some of them are.