com.fasterxml.jackson.databind.exc.MismatchedInputException: (although at least one Creator exists) - no String-argument to deserialize frm String val

Viewed 70

I have my pojo defined with the following paramater to map json "child" value

@JsonProperty("child")
private List<AccountholderProfileData> child = null;

However, I am receiving List to from the json "child".

Hence getting the following exception.

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.mtn.aggregator.models.response.AccountholderProfileData` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value

Could someone help me to map different return type of objects to the same jsonproperty in pojo.

0 Answers
Related