Skip to content

a problem we have when updating the version of Katharsis from 2.8.2 to 3.0.2 #451

@tangchengn

Description

@tangchengn

In the latest released version 3.0.2, there is a configuration in class "io.katharsis.resource.Resource" as below:
@JsonInclude(Include.NON_EMPTY)
private Map<String, JsonNode> attributes = new HashMap<>();

And our problem is:

when the value of a field needed in DTO is null, we hope that the field can be invisible, so the configuration we did in

class "KatharsisFeature" as we did before as below is no longer effective.

(objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
.configure(SerializationFeature.WRITE_NULL_MAP_VALUES,false)
.setSerializationInclusion(JsonInclude.Include.NON_NULL)

So, do you have any advice? looking forward to your reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions