4 ms·
This is a great complement to the PATCH HTTP verb for RESTful APIs. It's much better to have a standard way to describe how a resource should be changed and not
by bkeroack 12y ago
This is a great complement to the PATCH HTTP verb for RESTful APIs. It's much better to have a standard way to describe how a resource should be changed and not some ad hoc, implementation-specific syntax. Coincidentally, I just implemented support for this in one of my projects today (https://pypi.python.org/pypi/elita https://pypi.python.org/pypi/elita).
Here's a link to the original RFC from 2013: https://tools.ietf.org/html/rfc6902 https://tools.ietf.org/html/rfc6902
A cool thing is the "test" operation. JSON patches are atomic, so you can put in something like:
{ "op": "test", "path": "/foo/bar", "value": 32 }
...and if { foo: { bar: 75 }}, none of the patch will be applied.