In Spring 3.3 I have an entity which is mapped to a database table. In this entity class I have all properies annotated with @JsonProperty, for instance @JsonProperty("ID"). Stepping into the controller a service is called to get such an entity by using a DAO/repository. This works well but when I send this entity back to the requestor using @ResponseBody all properties are sent twice. Once as demanded but one more time beginning lowercase until the first camel case letter occurs. An example...
public class MyEntity {
@JsonProperty("MYSpecialSuperId")
private String MYSpecialSuperId;
...
public String getMYSpecialSsuperId() {
return this.MYSpecialSuperId;
}
}
After JSON stringifying the result is:
{ "MYSpecialSuperId":""9", "myspecialSuperId":"9" }
Why is the property twice in the result and why is the lettering different???
BTW: It was not my idea to let Java properties begin with an uppercase letter even yet with more than one uppercase letter.