JSON into XML using uipath Activities

uiautomation
activities
studio

#1

Hi All,

Is there a way I can convert a JSON into XML using uipath Activities?

Thank you


#2

Hi @ArpanSur
UiPath is installed Json.NET.
Try Invoke code activity.
Main.xaml (5.9 KB)


#4

Hi Tango,
I am unable to find this activity . Did you import any packages for invoke code activity in UI Path studio?
Regards,
Guna


#5

Hi @sguna001
InvokeCode activity is available starting with v2017.1.
Check your version.


#6

Hello Tango , The version is : 2016.2.6125
Is there any activity to use in this version. We have some dependencies because of which unable to upgrade it to 2017 version.

Thanks,
Guna


#7

Alternative is you can convert Json to XMLdocument then XMLDocument to XDocument

Use assign activites for this:

  1. Json to XMLDocument:

XMLDocument doc = JsonConvert.DeserializeXmlNode(jsonOutput, “root”)

  1. XMLDocument to Xdocument

XDocument xmlDoc = XDocument.Parse(doc.OuterXml)

xmlDoc will be the output.