Asked by: Jin Antonovaasked in category: General Last Updated: 5th March, 2020
What is JsonProperty annotation?
Hereof, what is the use of @JsonProperty?
@JsonProperty is a marker annotation to define logical property. @JsonProperty can be annotated at non-static setter or getter method or non-static object field. The logical property is used in serialization and de-serialization of JSON.
Also Know, what are Jackson annotations? Jackson is a suite of data-processing tools for Java comprising of three components: Annotations (jackson-annotations) contains standard Jackson annotations. Databind (jackson-databind) implements data-binding (and object serialization) support on streaming package.
Then, what is the use of @JsonIgnore annotation?
The @JsonIgnoreType annotation is used to mark a class to be ignored during serialization and deserialization. It marks all the properties of the class to be ignored while generating JSON and reading JSON. An example of Java class that uses the @JsonIgnoreType annotation is this.
What is JsonIgnore?
@JsonIgnore The Jackson annotation @JsonIgnore is used to tell Jackson to ignore a certain property (field) of a Java object. The property is ignored both when reading JSON into Java objects, and when writing Java objects into JSON.