Jackson tips

How to customize returned properties for DTOs ?

Special annotation, @JsonView exists for that. Imagine that you have a PersonDto class which contains two properties: name and age. You want to show name every time but age only for one endpoint. To e...

Continue Reading →

How to fix 'no suitable constructor' exception ?

org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type This exception is provoked by the impossibility to create object from provided input. For example it can oc...

Continue Reading →