jackson ignore values if empty
// every Value
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ObjectWithoutEmpty {
// only not empty Values get included
@JsonProperty("propertyOne")
private String propertyOne;
// only not empty Values get included
@JsonProperty("propertyTWO")
private String propertyTWO;
}
// one property
public class ObjectWithoutEmpty {
// only non empty Values get included
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("propertyOne")
private String propertyOne;
// empty Values get included
@JsonProperty("propertyTWO")
private String propertyTWO;
}
Also in Java:
- Error executing Maven. java.io.FileNotFoundException: The specified user settings file does not exist: /etc/java-8-openjdk
- java string to integer
- arrays.fill java
- change fragment in android studio
- how to return the lower of two values in one line java
- blurview android github
- string replace java
- java binary tree
- java php object
- how to remove all whitespace from string java
- parsedouble java
- java get an int from a char
- java loop through array
- how to do 4th root java
- java get folder content
- Java use Base64
- find the triplet sum in java linked list
- mock ParameterizedTypeReference
- java next permutation
- java override equals and hashcode
- esponente in java
- scanner check if int
- number to string java
- filter in list by time java