Skip to content
gqlxj1987's Blog
Go back

json patch

Edit page

原repo

The origin
{
  "baz": "qux",
  "foo": "bar"
}


The patch
[
  { "op": "replace", "path": "/baz", "value": "boo" },
  { "op": "add", "path": "/hello", "value": ["world"] },
  { "op": "remove", "path": "/foo" }
]

The result
{
  "baz": "boo",
  "hello": ["world"]
}

包含的操作:

{ "op": "move", "from": "/biscuits", "path": "/cookies" }
{ "op": "test", "path": "/best_biscuit/name", "value": "Choco Leibniz" }

Edit page
Share this post on:

Previous Post
End Data process
Next Post
how did sidecar get there