-
Notifications
You must be signed in to change notification settings - Fork 217
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
{"op":"add"} has no value if the value is undefined. #60
Comments
Please note that Theoretically we could ditch checking via |
I think that actually the right solution is that ["op": "remove", "path": "/bar"] WDYT? |
Related: #32 |
See #32 (comment) |
Indeed, this is a duplicate of #36; I missed this because I was looking specifically for |
The test cases added by @tomalec does not work without native Current implementation of dirty checking creates mirror of object with the following code: mirror.value = JSON.parse(JSON.stringify(obj)); As mentioned above, This leads to:
|
Fixed in 1.0.0 |
RFC 6902, section 4.1 ("add") says: "The operation object MUST contain a "value" member whose content specifies the value to be added."
jsonpatch.compare() can, however, produce an add operation with no value when the value is undefined.
Test case:
Result:
Error: 'value' MUST be defined
The text was updated successfully, but these errors were encountered: