-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathcreate.json
91 lines (91 loc) · 2.73 KB
/
create.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"errors": [
{
"op": { "op": "create", "path": "/a/b/c", "value": 1 },
"node": { "a": "b" },
"message": "jsonPatch.noSuchParent"
},
{
"op": { "op": "create", "path": "/a", "value": 1 },
"node": { "a": "b" },
"message": "jsonPatch.valueAtPathAlreadyExists"
},
{
"op": { "op": "create", "path": "/a", "value": 1 },
"node": { "a": null },
"message": "jsonPatch.valueAtPathAlreadyExists"
},
{
"op": { "op": "create", "path": "/obj/inner/b", "value": [ 1, 2 ] },
"node": {
"obj": {
"inner": {
"a": "hello",
"b": "world"
}
}
},
"message": "jsonPatch.valueAtPathAlreadyExists"
},
{
"op": { "op": "create", "path": "/~1", "value": 1 },
"node": [],
"message": "jsonPatch.notAnIndex"
},
{
"op": { "op": "create", "path": "/3", "value": 1 },
"node": [ 1, 2 ],
"message": "jsonPatch.noSuchIndex"
},
{
"op": { "op": "create", "path": "/-2", "value": 1 },
"node": [ 1, 2 ],
"message": "jsonPatch.noSuchIndex"
},
{
"op": { "op": "create", "path": "/foo/f", "value": "bar" },
"node": { "foo": "bar" },
"message": "jsonPatch.parentNotContainer"
}
],
"ops": [
{
"op": { "op": "create", "path": "", "value": null },
"node": {},
"expected": null
},
{
"op": { "op": "create", "path": "/a", "value": "b" },
"node": {},
"expected": { "a": "b" }
},
{
"op": { "op": "create", "path": "/array/-", "value": 1 },
"node": { "array": [ 2, null, {}, 1 ] },
"expected": { "array": [ 2, null, {}, 1, 1 ] }
},
{
"op": { "op": "create", "path": "/array/2", "value": "hello" },
"node": { "array": [ 2, null, {}, 1] },
"expected": { "array": [ 2, null, "hello", {}, 1 ] }
},
{
"op": { "op": "create", "path": "/obj/inner/b", "value": [ 1, 2 ] },
"node": {
"obj": {
"inner": {
"a": "hello"
}
}
},
"expected": {
"obj": {
"inner": {
"a": "hello",
"b": [ 1, 2 ]
}
}
}
}
]
}