data types

theory edited this page Aug 31, 2011 · 2 revisions

Data Types

Each API returns the body with its data type specified in the Content-Type HTTP header. Aside from the API Server's source API, all should return a consistent type. The supported types are:

  • text/plain
  • text/html
  • application/json
  • application/zip

JSON responses may contain values in one or more of the following data types:

Type Description
String A simple string value.
Number A simple numeric value.
Date: An string containing an ISO-8601 date in the UTC time zone, formatted as [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]Z. Example: "2011-04-20T23:47:22Z".
SemVer: A string containing a semantic version string.
Array: An array of one or more other values of any kind.
Object: A list of key/value pairs, where the keys are strings and the values may be any other type.