-
Notifications
You must be signed in to change notification settings - Fork 28
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
Setting value to undefined removes property #46
Comments
Looks like it is intentional: node-jsonpointer/jsonpointer.js Line 42 in 2a9875e
|
yeah, this is by design #27 I’d accept a PR that implements Please file a PR directly. |
What about exposing a new jsonpointer.settings({ allowUndefinedValue: true }) Is this something you would be interested in? |
sure, all of this sounds good |
One thing to note is there is NOT undefined in JSON, while undefined is a valid value in JavaScript object. So for [1, undefined, 2] in JavaScript, when it's converted to JSON, it becomes [1, null, 2], which may have undesired effect. |
I am setting a value of
undefined
on an object using your library, and this removes the property completely. I would like to keep the property and really set its property toundefined
.I also put an example here:
The text was updated successfully, but these errors were encountered: