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:
Convert a JSON file to an XML file and subsequently use the AIMMS predeclared functions
ReadXML
orReadGeneratedXML
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 LibraryConvert an XML file generated using
WriteXML
orGenerateXML
to a JSON file. If that is your use case, you are likely better off using the Data Exchange LibraryYou 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 useful for you: XML JSON conversion article