- Structured JSON response option: The IATI Datastore API now provides the ability to receive the response from the activity collection in a structured JSON format, which maintains the hierarchical context of the original IATI XML
Thank You IATI Community
`The IATI Technical Team appreciates all of the community feedback provided in response to our structured JSON proposal. It’s clear from the comments and emails we received that a structured JSON output format is a useful feature to make IATI data more accessible to developers that may be unfamiliar with XML. Particular thanks to Mark Brough and Steven Flower for providing documents on the history of JSON serializations of IATI XML, and David Raznick for suggesting Python packages and methods.
We agree that a schema-aware serialization (one in which the keys are serialized either as strings, decimals, or arrays depending on the IATI schema) would be produce JSON that is more similar to the underlying XML, however, a schema-agnostic recursive loop proved to be the most performant method we tested. Even after splitting large files into individual activities, the recursive loop function serialized the XML in about 20% of the time of the schema-aware serializations. Although the output of the recursive loop is not schema-aware, it does consistently serialize attributes into strings, and elements into arrays. We hope that this consistent serialization will further assist developers that may be unfamiliar with XML, and still be useful to experienced developers looking for the original hierarchical structure of the underlying data.
Thank you again for your time in answering our proposal, and we look forward to your continued feedback as we launch this new feature. As always, documentation about the new “iati_json” endpoint and how to use it are available on our Developer Portal.
We continue to welcome all user feedback - do post comments below or email firstname.lastname@example.org .
IATI Technical Team