LoginSignup
0
2

More than 5 years have passed since last update.

JSON Patch

Posted at

Json Patchとは?

Jsonデータに対して追加、削除、移動、コピーなどを行える便利なクラス

例:

[

{ "op": "test", "path": "/a/b/c", "value": "foo" },

{ "op": "remove", "path": "/a/b/c" },

{ "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },

{ "op": "replace", "path": "/a/b/c", "value": 42 },

{ "op": "move", "from": "/a/b/c", "path": "/a/b/d" },

{ "op": "copy", "from": "/a/b/d", "path": "/a/b/e" }

]

op | add, remove, replace, move, copy

"op"には
"add","remove","replace","move","copy","test"のいずれかを利用

AspNetCore.JsonPath

Microsoft.AspNetCore.JsonPatch から利用可能

参照

https://janaks.com.np/implementing-json-patch-in-asp-net-core/
http://jsonpatch.com/

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2