Thanks will try this.
On Tuesday, August 4, 2020 at 2:24:58 PM UTC-4, ajay mundru wrote:
>
> 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/4cb99f2f-2345-4808-8fb8-c44a3e19d66do%40googlegroups.com.