XmlToJson is a simple extension that allows the programmer to convert an XML document to the equivalent JSON. This makes it easier to deal with the data in OutSystems, as it's much easier to deal with JSON than XML.
Since version 1.02 it is possible to specify the (local) node names that are to be treated as arrays, even if the XML contains only a single element. This will help with situations where you may sometimes have a single element and sometimes multiple. Without specifying the node to be treated as an array, the JSON will sometimes contain an object, sometimes an array of objects, which means you cannot convert the JSON to a structure easily.
The extension uses NewtonSoft.Json's JsonConvert.SerializeXmlNode function for the heavy lifting, meaning that any limitations this asset has are due to that function.
The extension has a single action, XmlToJson (in version prior to 1.02 this was called toJSON), that has the following parameters:
The resulting JSON can be used to create structures from (design time), then serialized (run time). This is much easier than trying to serialize the XML.