JSONTOXML Gives '_uXXXX_'
Hello,
I am returning a JSON string from an API call and while the JSON looks ok, when it is converted to XML with the JSONTOXML call, key values that are just numbers are being converted to a format like '_uXXXX_'. Is this on purpose, because it makes it really painful to read the data...
Example:
select JSONTOXML('root',
'{ "discount": {
"1" : 0.9972748468,
"2" : 0.9882201067,
"3" : 0.9728680577,
"4" : 0.9527469664
}
}')
Gives:
<?xml version='1.0' encoding='UTF-8'?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<discount>
<_u0031_ xsi:type="decimal">0.9972748468</_u0031_>
<_u0032_ xsi:type="decimal">0.9882201067</_u0032_>
<_u0033_ xsi:type="decimal">0.9728680577</_u0033_>
<_u0034_ xsi:type="decimal">0.9527469664</_u0034_>
</discount>
</root>
Is this an XML thing?
Thanks for any advice on how to deal with this.
Regards,
Chris
Please sign in to leave a comment.
Comments
1 comment