In Event class POJO

@JsonProperty("aDocId")
private String aDocId = null;
  
public String getADocId() {
    return aDocId;
  }

  public void setADocId(String aDocId) {
    this.aDocId = aDocId;
  }

-------------------------------------------------------------------------------------
While doing a post request,

Event event = (Event) object;
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Event> entity = new HttpEntity<>(event, headers);
String response = restTemplate.postForObject(url, entity, String.class);
--------------------------------------------------------------------------------------
response says message cannot be accepted as it has unidentified field 

As the json getting posted has duplicate fields with different case: 
aDocId, adocId where as I expected only aDocId as per my Event class.

I could not change anything in the POJO as it is a auto generated class 
based on swagger.

I am using Spring boot. Seeking for help to resolve this scenario.

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/caca9bb1-8ffb-4a8f-a433-6901fa3c52eao%40googlegroups.com.

Reply via email to