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 @JsonIgnoreProperties

example For:

  @JsonIgnoreProperties (unknown unknown = true) public stable interface (unknown = true)  point {double getLatitude (); Double Late Longtime (); }   

This will ignore any other fields which are serialized using the Point Interface.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -