Skip to content

adding a public accessor to JsonPatch to retrieve the contained opera… #8

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

Closed
wants to merge 1 commit into from

Conversation

tbrantb
Copy link

@tbrantb tbrantb commented Sep 7, 2016

I have a case where I have a library that receives a JsonPatch doc. Before applying the patch to another Json doc, my library needs to validate the contents of the JsonPatch. For example you may not replace certain values at certain paths or you must have a particular role to be able to perform particular patch operations. So I need to iterate and validate each operation within the JsonPatch object in order to perform custom validation. In order to do this, I need JsonPatch class to be able to expose the underlying List. This pull request has a change to include a public getOperations() method on the JsonPatch class to return an Immutable copy of the internal operations list.

…tions. This is needed for external rule-based validation of the patch before applying the patch
@jasonchaffee
Copy link

+1 on needing this as well.

@jjlauer
Copy link

jjlauer commented Oct 19, 2016

+1 Is this fork dead as well the original project? A very simple PR that I need as well.

@jasonchaffee
Copy link

@jjlauer It is looking like they are not merging and/or replying to any PR that hasn't been submitted by someone from Box or isn't for Box. I am going to create my own fork and start maintaining there as open source that isn't tied to any organization. See https://github.com/dogote/json-patch

@tbrantb
Copy link
Author

tbrantb commented Feb 1, 2021

Clearly this is not going to be adopted by this project. Closing to get it out of the list of things I care about.

@tbrantb tbrantb closed this Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants