-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Description
Totally could be something I'm missing but I think I'm reading the spec right and check my patches via this online validator with...
Patch
[
{
"op": "test",
"path": "",
"value": {
"id": "00000000-0000-0000-0000-000000000000",
"parentID": "00000000-0000-0000-0000-000000000000"
}
},
{
"op": "replace",
"path": "",
"value": {
"id": "759981e8-ec68-4639-a83e-513225914ecb",
"originalID": "bar",
"parentID": "00000000-0000-0000-0000-000000000000"
}
}
]
Data
{
"id": "00000000-0000-0000-0000-000000000000",
"parentID": "00000000-0000-0000-0000-000000000000"
}
Patch results: SUCCESS
{
"id" : "759981e8-ec68-4639-a83e-513225914ecb",
"originalID" : "bar",
"parentID" : "00000000-0000-0000-0000-000000000000"
}
It appears to be occurring at patch.go
line 553. Per the spec pg 4
The following JSON strings evaluate to the accompanying values:
"" // the whole document
In the codebase you don't appear to handle empty string at the root of the json object. Came up from trying to use the revertible patches generated from https://github.com/wI2L/jsondiff output.
Metadata
Metadata
Assignees
Labels
No labels