Please enable JavaScript to view this site.

InterFormNG2 Manual

One of the valid input formats of InterFormNG2 is JSON files. If you e.g. want to data in an input JSON file in either an email or in a template, then you first need to convert the JSON file into XML. You can use the basic, converter workflow component, JSON to XML for that.

 

In order to select this component the payload must be JSON e.g. by selecting JSON as the input file type in the workflow.

 

The component has no input parameters:

 

NG2JSON2XML0001

 

The input JSON may contain objects with no value and arrays. They are created as nodes with a dummy names in the output XML.

 

 

Exceptions for the field name to XML node conversion

The field names of the input JSON file are converted into XML nodes with the same name as the JSON field with these exceptions:

 

The supported characters in the field names are the characters in the ranges: a-z, A-Z and numbers: 0-9. Any other character in the field name are replaced with an underscore, "_".

If the field name starts with a number a preceding underscore is added to the XML node.

 

 

Exceptions for the value conversion

The value of the JSON fields are copied into the value of the output XML file with this exception:

The conversion removes all illegal XML letters (e.g. character values below 32, except newline and carriage return).

 

 

Example

If you e.g. convert this JSON file:

 

NG2JSON2XML0002

 

Then the component will convert it into this XML file:

NG2JSON2XML0003

 

You can verify the output of the conversion e.g. with the To filesystem component:

 

NG2JSON2XML0004

 

You can also use the converted XML file as input for a merge with a template into e.g. print, email or PDF or transform the XML file before merging it.