Archive for the ‘Java’ Category

Using JacksonJson @JsonSerialiser annotation for a single property

Wednesday, March 31st, 2010

When using Spring MVC and the Jackson JSON processor recently, I needed to only expose one property from a referenced object when serialising. Rather than have a new object defined with the single property, I used the @JsonSerialiser annotation to serialise only the property I was interested in. I will use a ...