- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Tue, 18 Sep 2012 10:07:23 +0200
- To: public-rww <public-rww@w3.org>
- Message-ID: <CAKaEYhJXYydTZ=kEay-U59Xahe7mpjsoC9TJ5dY1maHCjfyFVA@mail.gmail.com>
1 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-1>.
Introduction
JavaScript Object Notation (JSON) [RFC4627
<http://tools.ietf.org/html/rfc4627>] is a common format for
the exchange and storage of structured data. HTTP PATCH [RFC5789
<http://tools.ietf.org/html/rfc5789>]
extends the Hypertext Transfer Protocol (HTTP) [RFC2616
<http://tools.ietf.org/html/rfc2616>] with a
method to perform partial modifications to resources.
The JSON Patch media type "application/json-patch" is a JSON document
structure for expressing a sequence of operations to apply to a
target JSON document, suitable for use with the HTTP PATCH method.
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-3>Document
Structure
A JSON Patch document contains a JSON array of objects. Each object
contains a single operation to apply to the target JSON document.
4 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4>.
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 3
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-3>
4.1 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.1>.
add . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-4>
4.2 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.2>.
remove . . . . . . . . . . . . . . . . . . . . . . . . . . 4
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-4>
4.3 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.3>.
replace . . . . . . . . . . . . . . . . . . . . . . . . . 5
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-5>
4.4 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.4>.
move . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-5>
4.5 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.5>.
copy . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-6>
4.6 <http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#section-4.6>.
test . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
<http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04#page-6>
[
{ "test": "/a/b/c", "value": "foo" },
{ "remove": "/a/b/c" },
{ "add": "/a/b/c", "value": [ "foo", "bar" ] },
{ "replace": "/a/b/c", "value": 42 },
{ "move": "/a/b/c", "to": "/a/b/d" },
{ "copy": "/a/b/c", "to": "/a/b/e" }
]
http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-04
Received on Tuesday, 18 September 2012 08:07:52 UTC