Reading JSON in EDS via jsonToXML has incorrect results.
Issue
jsonToXMLis not returning the correct XML data- query
select
convert
(
jsonToXml ( 'person', convert ( '[
{
"key": "ncloc",
"val": 229355,
"frmt_val": "229,355"
},
{
"key": "sqale_index",
"val": 8480.74957,
"frmt_val": "8,480.7"
}
]',clob ) ),
string
);
- expected
<?xml version='1.0' encoding='UTF-8'?>
<person>
<person>
<key>ncloc</key>
<val>229355</val>
<frmt_val>229,355</frmt_val>
</person>
<person>
<key>sqale_index</key>
<val>8480.74957</val>
<frmt_val>8,480.7</frmt_val>
</person>
</person>
- returned
<?xml version='1.0' encoding='UTF-8'?>
<person>
<person>
<key>ncloc</key>
<val>229355</val>
<frmt_val>229,355</frmt_val>
</person>
<frmt_val>
<key>sqale_index</key>
<val>8480.74957</val>
<frmt_val>8,480.7</frmt_val>
</frmt_val>
</person>
- JSONTOXML is not transforming correctly when JSON response include arrays with children list as param:value.
Environment
- Red Hat JBoss Enterprise Data Services (EDS) 5.3.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
