Hey guys,

I've recently encountered two standard formats that standardizes the HTTP PATCH, that could be important for formats we use for Data Sync features:

json-patch
http://tools.ietf.org/html/rfc6902

Defines set of operations that you can do with JSON object such as: add, remove, replace, move, copy, replace, test.

   [
     { "op": "test", "path": "/a/b/c", "value": "foo" },
     { "op": "remove", "path": "/a/b/c" },
     { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },
     { "op": "replace", "path": "/a/b/c", "value": 42 },
     { "op": "move", "from": "/a/b/c", "path": "/a/b/d" },
     { "op": "copy", "from": "/a/b/d", "path": "/a/b/e" }
   ]

The structure of the patch is list of operations, not the document itself.

We could actually rewrite DiffSync Server to use it (since it is very close to that format).



json-merge-patch (draft)
http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-0

Defines a format where you send updated parts of the JSON Object itself in same structure as original object:

e.g.: object:

     {
       "a": "b",
       "c": {
         "d": "e",
         "f": "g"
       }
     }

patch:

     {
       "a":"z",
       "c": {
         "f": null
       }
     }



Cheers,

~ Lukas