12 SCALAR VALUE REPRESENTATION

The scalar value representation represents a single value that is not itself a domain object.

This representation is never returned directly from a resource, but may appear in-lined within the representation of an action invocation §C19.4 if the action returned a scalar type such as a string or an integer.

The media type for a scalar representation will always be one of:

  • application/json;profile="…/action-result"

    • for the representation of an action invocation that returned a scalar value.

The representation itself consists of the following json-properties:

{
  "value": ...,
  "links": [ {
      "rel": ".../return-type",
      ...
    },
    ...
  ],
  "extensions": {
    "format": ...,
    ...
   }
}

where:

JSON-Property Description

links

list of links to resources.

links[rel=…/return-type]

(optional – only if the "formal" scheme §A3.1.2 capability is supported) link to the domain type §D21.3 of the value

extensions

additional metadata about the representation.

extensions.format

(optional – and only if the "simple" scheme §A3.1.1 capability is supported) qualifies the datatype value §A2.5.

Note that there is no "self" link, because the scalar value is not an addressable resource.

Restful Objects defines no standard child properties for the "extensions" json-property. Implementations are free to add to their own links/json-properties to "links" and "extensions" as they require.