0

I am having trouble with the capitalization conversion of json to xml in a camel route on "zip2ndPart". Everything was working fine when I was creating elements, but then I realized the user wanted attributes.

If I do

@XmlElement
String zip2ndPart

it works fine. However,

@XmlAttribute
String zip2ndPart

is capitalizing the "N" after the "2". I've tried adding a setter with no luck. Quite new to json, and a bit perplexed.

Also tried @JsonProperty('zip2ndPart') per several other answers, e.g. https://stackoverflow.com/questions/15303110/jackson-json-field-mapping-capitalization, but no joy.

johnnyB
  • 77
  • 1
  • 10

1 Answers1

0

Being new to the mapping, I was somehow thinking I needed to use the @JsonProperty, but it was of course the @XmlAttribute(name = 'zip2ndPart').

johnnyB
  • 77
  • 1
  • 10