From 58d574166fef1246f367009546358703e16d7f7e Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2026 10:26:51 +0100 Subject: api: add application/vnd.continuum.typed+json --- docs/openapi.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 5402389..36c3ddc 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -79,8 +79,9 @@ paths: description: | The value at the path, as JSON, or as `Accept` asks (`api.md`, Types): its type's own media type for a scalar (`application/octet-stream` for bytes, - `application/vnd.continuum.`), or `text/plain` (strings unquoted, - anything else as JSON). `Accept` is taken in its order; `406` if it names + `application/vnd.continuum.`), typed JSON + (`application/vnd.continuum.typed+json`, which tags what plain JSON would show + as another type), or `text/plain` (strings unquoted, anything else as JSON). `Accept` is taken in its order; `406` if it names nothing the value can be shown as. `application/json; timestamp-format=…` shows timestamps as `rfc3339` (the default), `unix`, `unix-ms` or `http-date`. Concurrent writes resolve as follows: concurrent maps merge, anything else @@ -117,7 +118,10 @@ paths: JSON maps and arrays become Automerge maps and lists; numbers become integers when they fit, floats otherwise; strings are plain strings (not text objects). - A scalar of another type is written as its media type (`api.md`, Types): + Typed JSON (`application/vnd.continuum.typed+json`) writes values of every + type, tagged (`{"$timestamp": …}`, `{"$bytes": …}`, `{"$uint": …}`, + `{"$counter": …}`, `{"$float": …}`, `{"$text": …}`, `{"$map": …}`). + A scalar of another type is also written as its media type (`api.md`, Types): `application/octet-stream` (bytes), `application/vnd.continuum.int`, `.uint`, `.float`, `.boolean`, `.counter` (decimal or `true`/`false`), or `application/vnd.continuum.timestamp; format=rfc3339|unix|unix-ms|http-date`; -- cgit v1.3.1