-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This document describes a media type that defines data and its references and is designed to provide a multilingual interface for managing this data.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
A simple JSON object is used to display data in different languages. This object consists of several key-value pairs and MUST contain at least one entry.
key In the first version, the language key is defined as a two-character alpha-2 code according to [ISO 639-1:2002].
value Translation in the corresponding language.
{
"en": "English translation",
"de": "Deutsche Übersetzung",
"fr": "Traduction française"
}
A HALO document uses the JSON format described in [RFC4627] and uses the media type "application/halo+json". Each response MUST be a HALO entity described by three reserved attributes:
- "links": Contains links to other resources. This is an OPTIONAL element.
- "data": Contains the actual data of the resource. This attribute can be single- or multi-value. This attribute is REQUIRED, but can contain an empty JSON object or array. The structure depends on the template of the call.
- "messages": Contains messages, which inform about error cause or success of a call. This is an optional element. In case of an error there is always a JSON array with at least one element.
{
"links": {...},
"messages": [...],
"data": {...} / [...]
}
©️ Ingo Kuba, 2020