'pljson converting xml to json issue?
Having issues with converting XML to JSON using pljson here is my XML
<orders>
<order>
<id>4781</id>
<customer_id>2330</customer_id>
<date_created>Tue, 22 Mar 2022 20:07:47 +0000</date_created>
<date_modified>Tue, 22 Mar 2022 20:07:56 +0000</date_modified>
<status_id>11</status_id>
<custom_status>Awaiting Fulfillment</custom_status>
</order>
</orders>
When converting it from XML to JSON, I get the JSON response why is it putting everything in brackets?
{
"row1" : "orders",
"row2" : ["order", ["id", "4781"], ["customer_id", "2330"], ["date_created", "Tue, 22 Mar 2022 20:07:47 +0000"], ["date_modified", "Tue, 22 Mar 2022 20:07:56 +0000"], ["status_id", "11"], ["custom_status", "Awaiting Fulfillment"]]
}
orders pljson_list;
l_json pljson;
orders := pljson_ml.xmlstr2json('<orders>
<order>
<id>4781</id>
<customer_id>2330</customer_id>
<date_created>Tue, 22 Mar 2022 20:07:47 +0000</date_created>
<date_modified>Tue, 22 Mar 2022 20:07:56 +0000</date_modified>
<status_id>11</status_id>
<custom_status>Awaiting Fulfillment</custom_status>
</order>
</orders>');
l_json := pljson(orders);
l_json.print;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
