Wednesday, July 24, 2013

JavaScript Object Notation (JSON) Patch

RFC 6902 (via Mattt Thompson):

JSON Patch is a format (identified by the media type “application/json-patch+json”) for expressing a sequence of operations to apply to a target JSON document; it is suitable for use with the HTTP PATCH method.

This format is also potentially useful in other cases in which it is necessary to make partial updates to a JSON document or to a data structure that has similar constraints (i.e., they can be serialized as an object or an array using the JSON grammar).

Patches are atomic; if any operation is not successful or one of the “test” assertions is violated, the patch doesn’t make any changes.

Comments RSS · Twitter

Leave a Comment