Skip to content

Latest commit

 

History

History
55 lines (31 loc) · 2.57 KB

clause_10_encodings.adoc

File metadata and controls

55 lines (31 loc) · 2.57 KB

Requirements classes for encodings

Overview

This clause specifies two pre-defined requirements classes for request and response message encodings to be used by implementations the Processes API. The two classes are:

The JSON requirements class defines the requirements for encoding Processes API request and response messages using JSON.

The HTML requirements class defines the requirements for encoding Processes API request and response messages using HTML.

Note
The encoding of Processes API request and response messages is distinct from the values that are generated when executing a process. Process output values can be of any type and are not bound by the requirements of the classes defined in this clause.
Note

Any server that supports multiple response encodings (JSON or HTML defined in this Standard or other encodings not specified in this Standard) will have to support a mechanism to mint encoding-specific URIs for resources in order to express links, for example, to alternate representations of the same resource. This document does not mandate any approach as to how this is supported by the server.

As clients simply need to dereference the URI of the link, the implementation detail and the mechanism as to how the encoding is included in the URI of the link are not important. Developers interested in the approach of a particular implementation, for example, to manipulate ("hack") URIs in the browser address bar, can study the API definition.

Two common approaches are:

  • An additional path for each encoding of each resource (this can be expressed, for example, using format specific suffixes like .html);

  • An additional query parameter (for example, "accept" or "f") that overrides the Accept header of the HTTP request.

The Core requirements class includes recommendations to support HTML and JSON as encodings, where practical.

Requirement Class "JSON"

This section defines the requirements class JSON.