0

I have the following field

@Mapping("greatId")
@XmlElement(name = "great_key")
private String greatKey;

So my getters and setters are getGreatKey(), and setGreatKey(..). Then my JSON do not contain the response with field "great_key". But if i add a getter getGreat_key(), then it returns the fields. I dont want to add those getters. What am i doing wrong ?

I found exact same problem explained in : XmlElement ignored by Jackson during serialization

Community
  • 1
  • 1
dinesh707
  • 12,106
  • 22
  • 84
  • 134

1 Answers1

0

Pretty sure that you are not using Jackson for serialization. ;) Get rid of the current serialization or make it respect the standard annotations.