-
Notifications
You must be signed in to change notification settings - Fork 192
Request for adding a block remove operation for arrays #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
OK well, the first issue I have is the diff code... While I have started working on it in order to understand it I am still not at ease with it, and I think it needs to be reworked. And it's been months since I've been touching it... Apart from that I don't like the use of Finally, well, this goes outside the scope of RFC 6902 ;) Which kind of calls for a v2; I am not against such an operation being added, far from it, but this would be yet another patch class. Ideally |
Oops, I hadn't even thought about the RFC, sorry about that. I will go ahead and close this request but keep the code hanging around on my fork in case it ever comes in handy. Keep up the good work! |
#787 JsonPath parsing - added throws to java doc
Currently operations to remove elements in an array are hard to read/write by hand. You either need to list the indexes you want to delete in reverse order or recalculate the indices on the fly, since the operations are applied in a stream and each operation is dependent on the previous(for instance deleting the first 2 elements requires 2 /0's). I would like to propose a block_remove operation that takes an array of indexes(all corresponding to the same position in the original array) and deletes them all at once. This could not only make the resulting diffs more compact, it could also help people who create them by hand.
I have created an example implementation here: joeltucci@341eb02
I didn't want to do this as a pull request since it may need to be significantly reworked, but if possible I would like to see this feature implemented.
Let me know if you have any questions/issues.
The text was updated successfully, but these errors were encountered: