Parsing JSON to XML using net.sf.json (java)
- by Castanho
Hi guys,
I'm parsing a generic JSON to a XML using net.sf.json. (I'm not using POJO Obj in the conversion)
When dealing with vectors I'm receiving:
<root>
<entry>
<Id>1</accountId>
<Items>
<e>
<cost>0.1</cost>
<debit>0.1</debit>
</e>
<e>
<cost>0.1</cost>
<debit>0.1</debit>
</e>
</Items>
</entry>
</root>
When the correct for my point of view should be:
<root>
<entry>
<accountId>1</accountId>
<Items>
<cost>0.1</cost>
<debit>0.1</debit>
</Items>
<Items>
<cost>0.2</cost>
<debit>0.2</debit>
</Items>
</entry>
</root>
Do anyone have used this lib and could help me?
Any tips could help!
Thanks in advance