z/TPF - Group home

DFDL updates in 2016

  

PJ44068: critical JSON fixes

The JSON being produced in the original DFDL support was not always valid JSON so PJ44068 was needed to fix the following issues:

1) JSON array notation [] was not being generated and was repeating the elements like what is done for XML.

2) JSON boolean values were being created as strings of either "true" or "false" instead of using the proper non-string notation.

3) The JSON null value was not being set for DFDL elements defined as nillable.  The value being set was the empty string which does not correctly correspond to the nil="true" value being generated in XML.

4) JSON documents were required to have the DFDL root element name; however, the root can be interpreted in JSON to be the JSON document itself.

 

PJ44104: DFDL serializer for XML/JSON

With the z/TPF DFDL serializer for XML and JSON, you can use DFDL to convert an XML or JSON document to a data stream. You can use the tpf_dfdl_serializeData function to serialize a tree structure that is associated with a z/TPF parser API into a data stream.  There are a few restrictions to serialization with DFDL.  XML attributes are not supported by DFDL and are ignored during serialization.  A JSON document requires the order to be maintained (as relates to the sequence statements in the DFDL).