Convert JSON to XML

History

In 2018, a library to exchange data between the JSON and XML formats was developed to permit data exchange between services that provide their data only in JSON format and AIMMS that allowed data exchange via XML. Nowadays, the Data Exchange Library is provided making the original use case for this XML JSON conversion library obsolete.

Current available tools

There are several use cases for working with JSON and XML files:

  1. Convert a JSON file to an XML file and subsequently use the AIMMS predeclared functions ReadXML or ReadGeneratedXML to read the data from the XML file into AIMMS identifiers. If that is your use case, you are likely better off using the Data Exchange Library

  2. Convert an XML file generated using WriteXML or GenerateXML to a JSON file. If that is your use case, you are likely better off using the Data Exchange Library

  3. You want to convert a JSON file to an XML file, but you do not want to exchange the data in those files with AIMMS identifiers in your model. Perhaps the library from 2018 is still usefull for you: XML JSON conversion article