Function samples
Convert JSON to XML, using the CONVERT_JSON_TO_XML function, as explained with an example.
A sample JSON is given below.
{'DATA':{ROW[
{
'TransactionID':'A12345678',
'PolicyID':'SAMPLE_POLICY',
'TFS_Amt':'12300.45',
'Inception_Date':'3/14/2001',
'PremiumAmt':'400'
},
{
'TransactionID':'B99999999',
'PolicyID':'ADDRBOOK',
'TFS_Amt':'100.05',
'Inception_Date':'3/17/2015',
'PremiumAmt':'1000'
}
]}}The XML generated for the above JSON is given
below.
<ROW>
<TFS_Amt>12300.45</TFS_Amt>
<Inception_Date>3/14/2001</Inception_Date>
<TransactionID>A12345678</TransactionID>
<PremiumAmt>400</PremiumAmt>
<PolicyID>SAMPLE_POLICY</PolicyID>
</ROW>
<ROW>
<TFS_Amt>100.05</TFS_Amt>
<Inception_Date>3/17/2015</Inception_Date>
<TransactionID>B99999999</TransactionID>
<PremiumAmt>1000</PremiumAmt>
<PolicyID>ADDRBOOK</PolicyID>
</ROW>
</DATA>The figure below is an example of a rule procedure with
CONVERT_JSON_TO_XML function invocation.