Output Format

You should specify method’s output format by appending appropriate extension to a method name: .json for JSON output, .xml for XML output. Select and Retrieve methods support two additional formats: HTML (.html) and CSV (.csv). The only exclusion to this rule is an Attachment method as it returns the content of the file in its native format.

JSON and XML outputs closely map to each other wherever possible. Arrays in JSON are indicated by square brackets while objects are indicated with curly braces and object properties and their values are in "key": value format. In XML arrays and object are both tags. Arrays tags wrap all their items and usually named in plural, object tags wrap their individual properties and named in singular. Object properties usually have simple content. To illustrate both formats let’s compare them side by side: