If you Google for an answer, you'll see various examples of JSON patch where the JSON payload describes one or more operations, such as this one which replaces/updates a value:
PATCH /people/guid123lalala HTTP/1.1
Content-Type: application/json-patch
{
"op": "replace",
"path": "/FullName",
"value": "Willy Lopez"
}
Or this one:
PATCH /people/guid123lalala HTTP/1.1
Content-Type: application/json-patch
[
{"replace": "/FullName", "value": "Willy Lopez"}
]
(Which I'm not even sure is correct for JSON-patch.)
However, the application/json-patch
format is not supported. So as of January 2015, for OData on WebApi 2.2, just send the object with the non-changing properties omitted, like this using normal JSON:
PATCH /people/guid123lalala HTTP/1.1
Content-Type: application/json
{
FullName: "Willy Lopez"
}