java - Jackson mapper: ignore certain properties when writing? -
I use JSON Mapper to read the object from a string and then write the string with the object. I would like to write some qualities only when writing What is the easiest way to accomplish this?
On the interface you can use example For: This will ignore any other fields which are serialized using the Point Interface. @JsonIgnoreProperties
@JsonIgnoreProperties (unknown unknown = true) public stable interface (unknown = true) point {double getLatitude (); Double Late Longtime (); }
Comments
Post a Comment