json-diff-rfc6902
Version:
This framework is to compare two JSON data and generate the Patch
106 lines • 2.65 kB
JSON
[
{
"op": "replace",
"path": "/quota_remaining",
"value": 277
},
{
"op": "add",
"path": "/items/0",
"value": {
"owner": {
"reputation": 24,
"user_id": 4088549,
"user_type": "registered",
"accept_rate": 100,
"profile_image": "https://www.gravatar.com/avatar/6044a964159e6388eab37f2fd14c7ddf?s=128&d=identicon&r=PG&f=1",
"display_name": "Horatiu",
"link": "http://stackoverflow.com/users/4088549/horatiu"
},
"is_accepted": false,
"score": 0,
"last_activity_date": 1462370990,
"creation_date": 1462370990,
"answer_id": 37030271,
"question_id": 37030136
}
},
{
"op": "add",
"path": "/items/1",
"value": {
"owner": {
"reputation": 6465,
"user_id": 2592042,
"user_type": "registered",
"accept_rate": 71,
"profile_image": "https://i.stack.imgur.com/WaCJN.gif?s=128&g=1",
"display_name": "Reddy",
"link": "http://stackoverflow.com/users/2592042/reddy"
},
"is_accepted": false,
"score": 0,
"last_activity_date": 1462370989,
"creation_date": 1462370989,
"answer_id": 37030270,
"question_id": 37030106
}
},
{
"op": "add",
"path": "/items/2",
"value": {
"owner": {
"reputation": 66,
"user_id": 5907509,
"user_type": "registered",
"profile_image": "https://graph.facebook.com/10203805918026890/picture?type=large",
"display_name": "Andrius Darulis",
"link": "http://stackoverflow.com/users/5907509/andrius-darulis"
},
"is_accepted": false,
"score": 0,
"last_activity_date": 1462370989,
"creation_date": 1462370989,
"answer_id": 37030269,
"question_id": 36975284
}
},
{
"op": "add",
"path": "/items/3",
"value": {
"owner": {
"reputation": 86870,
"user_id": 15055,
"user_type": "registered",
"accept_rate": 82,
"profile_image": "https://www.gravatar.com/avatar/7f71287b47b7189d11fe6d3fbc7ed2fe?s=128&d=identicon&r=PG",
"display_name": "Claudiu",
"link": "http://stackoverflow.com/users/15055/claudiu"
},
"is_accepted": false,
"score": 0,
"last_activity_date": 1462370980,
"creation_date": 1462370980,
"answer_id": 37030266,
"question_id": 37014246
}
},
{
"op": "remove",
"path": "/items/30"
},
{
"op": "remove",
"path": "/items/30"
},
{
"op": "remove",
"path": "/items/30"
},
{
"op": "remove",
"path": "/items/30"
}
]