I'm working on a web application using Spring REST (3.2.8.RELEASE), GAE and Objectify (v 4.0b3). I'm new to both GAE and Objectify.
The application returns data in JSON format.
I'm getting a 500 error when Jackson serializes the Objectify Key. So, I tried to use @JsonIgnore as mentioned in this posting JsonMappingException: How to transfert a Objectify Entity (with Key) through Restlet .
But it's still throwing the same 500 error. I tried to place the @JsonIgnore at the attribute, getter, setter method, but no luck.
Can someone give me some guidance on what I may be doing incorrectly? The other option is to write a custom serializer.
Thanks so much in advance for your help.
public class CategoryTrackingCount {
Key<CategoryTracking> categoryTrackingKey;
@JsonIgnore
public Key<CategoryTracking> getCategoryTrackingKey() {
return categoryTrackingKey;
}
@JsonIgnore
public void setCategoryTrackingKey(Key<CategoryTracking> categoryTrackingKey) {
this.categoryTrackingKey = categoryTrackingKey;
}
}