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

Non-standard extension? #37

Open
mpnally opened this issue May 4, 2017 · 3 comments
Open

Non-standard extension? #37

mpnally opened this issue May 4, 2017 · 3 comments

Comments

@mpnally
Copy link

mpnally commented May 4, 2017

One of the limitations of JSON patch that causes me problems in practice is that I can't add to an array if it isn't there and I also can't add the array without blowing away any existing array. [Perhaps there is a way of doing this that I don't know.]

I noticed that it is trivial to modify the code to allow '/foo/-' to create the array if it's not there. I understand that implementing non-standard extensions to JSON patch is going to create a lot of resistence, but it does make it a lot more useful. So I thought I'd see what the reaction to the idea was.

@almost
Copy link
Member

almost commented May 5, 2017

Hi Martin, I'd rather not implement non-standard extensions in the library, there are just too many problems it could create. One option would be to talk to the group at IETF about the standard, maybe there'll be another revision at some point.

@mpnally
Copy link
Author

mpnally commented May 5, 2017

That would probably be my response in your position. Thanks for taking the time. Since the function is so useful, I'm using a modified version of the code. I should probably also use a modified media type. Maybe 'x-application/json-patch-plus+json'

@gabrielgrant
Copy link

@mpnally any chance of publishing a branch with your change?

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

3 participants