JSON Output - AFS

AFS Integration Guide

Reference Guide

JSON (JavaScript Object Notation) is a lightweight text-based open standard derived from the JavaScript programming language. It is used to represent simple data structures and associative arrays, called objects.

For more information about the complete language specification, see http://www.json.org/.

The JSON output feed is closely related to the XML one. The name, purpose, and content of all the nodes remains the same. It can be considered as a simple translation from XML to JSON.

Four general rules drive this translation:

  • XML nodes are treated as JSON objects.
  • XML attributes are treated as JSON object properties.
  • Unique XML child nodes are treated as nested JSON objects.
  • Lists of XML child nodes are treated as a single JSON object with a list property.


An output feed may be represented in XML as follows:

<afs:query userId="f58b1d87-cb41-46c1-9efb-d8f47b10f8c8"
<afs:queryParam name="afs:output" value="xml"/>
<afs:queryParam name="afs:service" value="7019"/>

The same output feed sample becomes the following in JSON:

{"userId" : "f58b1d87-cb41-46c1-9efb-d8f47b10f8c8",
"sessionId" : "f9f0da83-016d-4546-9a17-4fd66092571a",
"textQuery" : "",
"queryParam" :

The complete JSON output feed is described in a JSON Schema at http://ref.antidot.net/v7/search.json-schema.
The schema complies with the standard described at http://json-schema.org/.