Format Converter

The Format Converter Node can be used to quickly convert data from one format to another.

The Format Converter supports these formats:
  • CSV
  • Delimited
  • JSON
  • XML

When converting from JSON or XML to CSV or delimited there are limitations because CSV data is flat and cannot convey the hierarchical structures that may be in the JSON or XML documents.

When converting from JSON to CSV or delimited the location of an array of objects is provided to the node by using the Input Array Path property. The node looks at the first element of the array to determine the set of fields that are included in the output CSV. This assumes that each object within the array has the same set of fields. If subsequent objects have more fields that the first node, these additional fields are ignored.

For example, given the JSON:
{
    "addresses": [
        {
            "street": "10 Main St",
            "city": "Smallville",
            "state": "GA"
        },
        {
            "street": "20 High St",
            "city": "Springville",
            "zip": "12345"
        }
    ]
}
The generated CSV is as shown:
street,city,state
10 Main St,Smallville,GA
20 High St,Springville,

Since the second object does not contain a state key, that value is null. Additionally, although the second record contains a zip key, that is ignored because the fields are determined from the first object.