What I am trying to achieve:
Parse a json using Jackson and JsonProperty, however, the key, while always the same, comes in all flavor of upper lower cases.
What I tried:
The input json has a field {"field": "value"}
Therefore, in my POJO, I do this:
public record MyPojo(@JsonProperty("field") String field
This works, but then, the key comes in different flavor of cases.
i.e. {"fieLd": "value"}
{"Field": "value"}
{"fIEld": "value"}
etc
For now, I use the @JsonAlias("fieLd")
etc...
But this is not scalable, since there are many permutations of cases.
Question:
How to tell Jackson and the JsonProperty to simply ignore the case?