Azure Functions – Convert Json to Xml with newtonsoft

I’m in the midst of putting together a few Azure Functions to use with Logic Apps.
This one is pretty simple, and demonstrates a couple of concepts so I thought I’d share.

One thought on “Azure Functions – Convert Json to Xml with newtonsoft”

  1. Gord,
    I am looking for help doing the same type of thing. I need to get an XML/CSV file from FTP (I can do), Transform XML with BizTalk Map to Corrected XML Structure (I can do) and then the part I am stuck on….
    I need to flip the XML to JSON. Bummer.. I know the @json(xml(….. will work for the entire file, but the issue is with Arrays. Sometimes the XML has multiple elements, sometimes not. The outgoing JSON always needs to have certain elements defined as array with [], even when single element. Logic App is not working for me, So I wanted to use Azure Function to accept a XML file as a whole, then flip to JSON, but allow me to control which elements are arrays [] and which ones are not. I know the three elements that always need to be arrays, even as single elements.

    I have little to zero experience doing this. I have been out of coding for years. But this seems simple enough. Any chance you could help get me through this?

Leave a Reply

Your email address will not be published. Required fields are marked *