I am getting this exception when I am trying to parse Json to Java pojo object. The object graph has couple objects.
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "id" (Class Criteria), not marked as ignorable
I wanted to see, in which case this exception will come, where could be the problem is it in the object graph??
I am doing this in my android project I am not using annotations here I am not sure how to add this field as ignorable.
You don't show any code, so...
Anyway, try and add this annotation to the class you deserialize:
@JsonIgnoreProperties(ignoreUnknown=true)
This will also happen if you have defined the field in your POJO, but do not have a getter AND setter methods defined. Ignoring the field may have unintended consequences.
This does look to be a duplicate of: Jackson with JSON: Unrecognized field, not marked as ignorable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With