Skip to content

Jackson Json Deserialisation: Unrecognized field “…” , not marked as ignorable

I’m getting the following error and no resolution i found did the trick for me:

Unrecognized field “GaugeDeviceId” (Class GaugeDevice), not marked as ignorable

The problem seems, that the service returns the property names with a leading upper letter, while the class properties begin with a lower letter.

I tried:

  1. changing the propertyNames to first upper letter – same error
  2. adding @JsonProperty("SerialNo") to the property instantiation – same error
  3. adding @JsonProperty("SerialNo") to the corresponding getters – same error
  4. adding @JsonProperty("SerialNo") to the corresponding setters – same error
  5. adding @JsonProperty("SerialNo") to all of them (just for fun) – same error

(note: @JsonProperty("SerialNo") is just an example)

The strange thing is, that annotation: @JsonIgnoreProperties(ignoreUnknown = true) should suppress exactly that error, but it is still triggering…

here the Class: (note: not complete)

@JsonIgnoreProperties(ignoreUnknown = true)
public class GaugeDevice 
    private int gaugeDeviceId;
    private Date utcInstallation;
    private String manufacturer;
    private float valueOffset;
    private String serialNo;
    private String comment;
    private int digitCount;
    private int decimalPlaces;

    public String getSerialNo() {
        return serialNo;

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;

    public String getComment() {
        return comment;

    public void setComment(String comment) {
        this.comment = comment;

Where is the way out here? Please help.


Here is the Client Class: (just a simple test client)


import org.glassfish.jersey.jackson.JacksonFeature;

public class RestClient
    private String connectionUrl;
    private client;

    public RestClient(String baseUrl) {
         client = ClientBuilder.newClient();;
         connectionUrl = baseUrl;

    public GaugeDevice GetGaugeDevice(int id){

        String uri = connectionUrl + "/GetGaugeDevice/" + id;
        Invocation.Builder bldr ="application/json");
        return bldr.get(GaugeDevice.class);

I hope the error has its root here?



Another thing to check out is PropertyNamingStrategy, which would allow Jackson to use “Pascal naming” and match JSON properties with POJO properties. See f.ex here:

User contributions licensed under: CC BY-SA
10 People found this is helpful