cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to convert JSON to XML using standard JSON to XML convertor standard pallette in CPI

Hello Experts,

Request your kind help on the below error while trying to convert from JSON to XML using standard JSON to XML convertor standard palette in CPI.

However, I tried all the options but no luck.

Kindly help with any groovy script/any solution so that I can proceed further.

Please do the needful.

Here is my Input JSON Data :

{

"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",

"id": "716979cf-1e22-42f7-a20f-ee1f03a34cad",

"businessPhones": [],

"displayName": "Mark Dolphin",

"givenName": null,

"jobTitle": null,

"mail": null,

"mobilePhone": null,

"officeLocation": null,

"preferredLanguage": null,

"surname": null,

"userPrincipalName": "MarkDolphin123@azure.com"

}

Iflow Configured:



Error Received while conversion into XML:


Thanks in advance!!

Regards,

Prashanth

View Entire Topic
lalit2054_46
Participant
0 Kudos

This can be achieved without groovy script but in content modifier -

In Message Body section write below expression --

${bodyAs(String).replaceAll("@odata.context", "odata.context")}
0 Kudos

Hi Lalit,

It is interesting one, it Worked, Thanks!!