Skip to content
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

Disable removal patch operation via flag #105

Open
Tom-Ritense opened this issue Aug 19, 2019 · 1 comment
Open

Disable removal patch operation via flag #105

Tom-Ritense opened this issue Aug 19, 2019 · 1 comment

Comments

@Tom-Ritense
Copy link

Tom-Ritense commented Aug 19, 2019

Question

I would like to only replace/add json content to existing json content.
I don't want a subset request to remove my already populated properties.

An example:

Existing json content:
{"firstName": "John", "age": 18}

Proposed json content
{"firstName": "Richard"}

When json diff is run this results in 2 op's -> 1 change 1 remove.
I would like to merge 2 json's essentially by applying patch operations.
There is no way to disable the removal operations. I was thinking about building my own processor but this is not possible as far as I can see.

@holograph
Copy link
Collaborator

I'm not really clear on what you're aiming for.. there are two changes in your example. Do you mean you want to get two separate JSON diffs representing each change in sequence? If so, you can easily just take the resulting array and just index it...

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

No branches or pull requests

2 participants