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

Replacing null returns error #69

Closed
ghost opened this issue Mar 27, 2015 · 4 comments
Closed

Replacing null returns error #69

ghost opened this issue Mar 27, 2015 · 4 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Mar 27, 2015

@Starcounter-Jack I'm on 0.5.1.

My object: {foo: null}
My patch: [ { op: 'replace', path: '/foo', value: 'whatever' } ]
Returns: "Cannot perform the operation at a path that does not exist".
Expected: {foo: 'whatever'}

@tomalec tomalec added the bug label Mar 27, 2015
@tomalec tomalec self-assigned this Mar 27, 2015
@tomalec
Copy link
Collaborator

tomalec commented Mar 27, 2015

Thanks for reporting @winduptoy!
I'm currently working on fixing entire falsy values approach, pleas let me know if you find any similar cases.

@tomalec
Copy link
Collaborator

tomalec commented Mar 27, 2015

@winduptoy, it should work fine now. It wil be released as 0.5.2
I've also added test cases to json-patch/json-patch-tests#17. Once PR will get merged (or rejected) I will merge it to our repo as well.

@ghost
Copy link
Author

ghost commented Mar 27, 2015

👍

@gdibble
Copy link

gdibble commented Apr 17, 2015

good fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants