From 7afdb563b208459bb308c7ffc4f671ee23b0ca26 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 31 May 2013 14:05:17 +0300 Subject: new data type: List --- protocol.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'protocol.txt') diff --git a/protocol.txt b/protocol.txt index 9a09511..523b474 100644 --- a/protocol.txt +++ b/protocol.txt @@ -36,10 +36,12 @@ resp: JSON object, with the following attributes: data: JSON serialization of object - primitive types as JSON primitives - references as path names (relative to scope) - - models, collections, and sets as JSON objects or arrays - with members as attributes: + - models as JSON objects with members as attributes: - primitive members as JSON primitives - - reference, model, and collection members as path names + - reference, model, collection, list, and set members as + path names + - collections, lists, and sets as JSON arrays with members + as attributes (as for models) meta: JSON object, with the following attributes - name (last component of path name) - ui-name (shown to user) @@ -69,6 +71,12 @@ req: PUT /config/ in GET responses - undefined model attributes are deleted +Add object to a list: +req: POST /config/ + - body is a JSON object with the following attributes: + data: object to be added, serialized as in GET responses + index: position, defaults to the end of the list + Delete object: req: DELETE /config/ -- cgit v1.2.3