Skip to content


Using Newtonsoft with SmartConnect to Convert JSON to XML

In this article we will add Newtonsoft to SmartConnect and use it to convert a json file to xml.

To start, you will need to load Newtonsoft into SmartConnect. Download the Newtonsoft.Json.dll file from here ( You will need to download the complete zip file found under Assets. At the time of this writing the most recent will be Once you have the zip file downloaded, copy the Newtonsoft.Json.dll file from the Bin\net45 directory. Paste the file into the following folders:
C:\Program Files (x86)\eOne Solutions\SmartConnect

Once the files have been copied to the necessary directories we can add the namespaces in SmartConnect. From the Newtonsoft.json assembly, add the Newtonsoft.Json and Newtonsoft.Json.Linq namespaces.


From the system.xml.linq assembly, add the System.Xml.Linq namespace.


From the system.core assembly add the System.Linq namespace.


After all namespaces have been added to the Current Namespaces section, click OK and restart SmartConnect.

As mentioned before, the goal is to use Newtonsoft in this example to convert a json file to xml, but you can use Newtonsoft for many things. Refer to the Newtonsoft documentation ( for more information.

I am going to use a pre-map task to convert my json file to xml and then use that generated xml as a data source on the same map. My pre-map task will be a Run Script task:

Dim o1 As JObject = JObject.Parse(File.ReadAllText("C:\PATH_TO_YOUR_FILE\tech_tuesday.json"))
Dim node As XNode = JsonConvert.DeserializeXNode(o1.ToString, "Root")
File.WriteAllText("C:\PATH_TO_SAVE\json_to_xml.xml", node.ToString)



This will convert my tech_tuesday.json file to xml and save an xml file called json_to_xml.xml. To complete the map setup, this xml file will already have to exist to be selected as the data source. If you do not have an xml file with the correct formatting, you can setup a dummy source and destination so that you can run the map and have the pre-map task create the properly formatted xml file which you can then point to as the source when modifying the map. For me, this is a quicker process than creating my own xml that will match the converted json.

The sample json and xml files can be downloaded here.

Leave a Comment


eOne Welcomes Incremental Group as a New eOne iPaaS Integration Partner
Employee Spotlight: Floyd Jones, Front End Developer
NEW WEBINAR: Popdock Onboarding - Fall in Love with Your Data
Employee Spotlight: Calum McGrath, Implementation Consultant
A Pricing Update Regarding the SmartConnect Perpetual Plan


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder



Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release SalesForce SmartConnect SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.