java-json-tools/json-patch

Supporting wildcard in path

Closed this issue · 0 comments

Hello,
I was wondering if its possible to add support for wildcard in path.

{
"biscuits": [
{ "name": "Digestive" },
{ "name": "Choco Leibniz" }
]
}

In the example of:
{ "op": "replace", "path": "/biscuits/*/name", "value": { "name": "ChangeEverything" } }

would lead to:

{
"biscuits": [
{ "name": "ChangeEverything" },
{ "name": "ChangeEverything" }
]
}

In case we aren't sure the amount of entries in an array, supporting this could help generalize it and allow updates everywhere