JSON
Every resource you interact with using the DPS REST API must be represented in JSON format.
JSON is a lightweight data interchange format derived from JavaScript. It is widely used in RESTful web services and is prominent in dynamically typed languages such as JavaScript, Ruby, and Python. Mature tooling and library support is also available for Java and .NET languages.
Specifying JSON in the Request Header
To explicitly specify JSON format in your requests, include the Accept request header to request this media type:
- application/json
Passing JSON in the Request Body
For example, include JSON like the following in the request body to create a contact for Joanna Smith:
{ "ContactID": "JoannaSmith", "FirstName": "Joanna", "LastName": "Smith" }
As the example shows, JSON represents data as name-value pairs, using the colon character to delimit the name and the value.