Adding elemente to array
mathiasbrito opened this issue · 1 comments
mathiasbrito commented
Add operations with - at the of the path intending to insert a new value in a array is implemented?
from: http://jsonpatch.com/
Add
{ "op": "add", "path": "/biscuits/1", "value": { "name": "Ginger Nut" } }
Adds a value to an object or inserts it into an array. In the case of an array, the value is inserted before the given index. The - character can be used instead of an index to insert at the end of an array.
When trying to do so "path": "/biscuits/-", ex:
[
{
"op": "add",
"path": "/biscuits/-",
"value": "bono"
}
]I get:
list indices must be integers or slices, not str
Am I doing something wrong or the feature is not implemented?
mathiasbrito commented
sorry, mixed up json-pointer/json-patch...