Closed TFleury closed 7 years ago
It seems my interpretation was wrong.
RFC says :
This operation is functionally identical to a "remove" operation on the "from" location, followed immediately by an "add" operation at the target location with the value that was just removed.
The correct patch should be
[{
op: "move",
from: "/Children/0",
path: "/Children/0/Children/-"
}]
Assume you have a nestable class like this one :
Your have this object :
And you want to move 1.1 into 1.2. The operation should be :
And you expect to obtain :
Correct ?
But it fails with :
The index value provided by path segment '1' is out of bounds of the array size.
It's because move gets value, removes source and add at destination. but in this special case, destination has moved...