Hi What version of Camel do you use? And have you configured the xmljson data format in any way?
The @ is because the xml value is from an xml attribute. I wonder if there is a way to turn that off in the xmljson library as yeah that is not needed in the json output. On Thu, Nov 13, 2014 at 12:27 AM, salemi <sal...@avaya.com> wrote: > Hi, > > I am using the xmljson to convert xml to json. When I do that then I see @ > signs added to attributes of an element see example below. How can I remove > the @ signs from the output. > > xml file: > <?xml version="1.0" encoding="utf-8"?> > <current> > <city id="5095626" name="Bernardsville"> > <coord lon="-74.57" lat="40.68"/> > <country>US</country> > <sun rise="2014-11-12T11:42:13" set="2014-11-12T21:42:48"/> > </city> > <temperature value="286.59" min="284.95" max="288.15" unit="kelvin"/> > <humidity value="68" unit="%"/> > <pressure value="1006.973" unit="hPa"/> > <wind> > <speed value="2.66" name="Light breeze"/> > <direction value="326" code="NW" name="Northwest"/> > </wind> > <clouds value="0" name="clear sky"/> > <visibility/> > <precipitation mode="no"/> > <weather number="800" value="Sky is Clear" icon="01n"/> > <lastupdate value="2014-11-12T23:06:51"/> > </current> > > JSON output: > { > "city": { > "@id": "5095626", > "@name": "Bernardsville", > "coord": { > "@lon": "-74.57", > "@lat": "40.68" > }, > "country": "US", > "sun": { > "@rise": "2014-11-12T11:42:13", > "@set": "2014-11-12T21:42:48" > } > }, > "temperature": { > "@value": "286.59", > "@min": "284.95", > "@max": "288.15", > "@unit": "kelvin" > }, > "humidity": { > "@value": "68", > "@unit": "%" > }, > "pressure": { > "@value": "1006.973", > "@unit": "hPa" > }, > "wind": { > "speed": { > "@value": "2.66", > "@name": "Light breeze" > }, > "direction": { > "@value": "326", > "@code": "NW", > "@name": "Northwest" > } > }, > "clouds": { > "@value": "0", > "@name": "clear sky" > }, > "visibility": [], > "precipitation": { > "@mode": "no" > }, > "weather": { > "@number": "800", > "@value": "Sky is Clear", > "@icon": "01n" > }, > "lastupdate": { > "@value": "2014-11-12T23:06:51" > } > } > > > > > ----- > Alireza Salemi > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-xmljson-add-signs-to-the-json-output-how-to-remove-the-signs-tp5759013.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/