I am using JacksonAnnotation along with the Spring Framework to parse the JSON that I get from the web service for my application.
I have the same data structure coming from two different methods, but in one of them there is a field that happens to be uppercase. Because of this, I do not want to create two data structures.
Is there a way for me to make the JsonGetter case insensitive, or at least accept two versions of a string?
Currently I have to use this for method A
@JsonGetter("CEP") public String getCEP() { return this.cep; }
and this is for method B
@JsonGetter("CEP") public String getCEP() { return this.cep; }
thanks
source share