I am using feign for my rest-calls. Unfortunately one of the responses I get looks something like this:
{
"customer-id" : "0123"
}
The JSON response automatically gets mapped to one of my POJO's. This response object can not have a property field with the name "customer-id", as the dash (-) is not allowed in the name of an identifier.
I tried the following:
public class LookUpAccountsResponse {
@JsonProperty("customer-id")
private String customerId;
}
But unfortunately this doesn't work. Does anyone have a suggestion on how to fix this?