Don’t return property when it’s an empty list with jackson
You can use @JsonInclude(JsonInclude.Include.NON_EMPTY) annotation on your class or filed. import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_EMPTY) class Person { String name; List<Event> events; //….getter, setter }