jsonpatch-js
jsonpatch-js copied to clipboard
A JavaScript implementation of the JSON Media Type for partial modifications: http://tools.ietf.org/html/rfc6902
The code is vulnerable to prototype pollution, because it allows patching `__proto__`. This can be escalated to remote code execution if user-supplied input is passed as the patch list: ```js...
The `error.stack` property is missing. Looks like CoffeeScript's "inheritance" just sets the prototype and the constructor does not contain a `super()` call, so the native constructor of `Error` is never...
`new jsonpatch.JSONPointer("/x").getReference({x:123})` returns {x:123} instead of 123
Example: ``` {"mydata": ["apple", "orange","pear", "lemon"]} ``` With the following operation: ``` [{"op":"remove","path":"/mydata/0"},{"op":"remove","path":"/mydata/2"}] ``` The result is: ``` { "mydata": ["orange","pear"] } ``` Rather than the expected: ``` { "mydata":...
Any plans on doing a declarative wrapper around this? If not, would you be interested in me making a contrib?
Per HTTP PATCH spec ``` Note that the HTTP PATCH method is atomic, as per [RFC5789]. Therefore, the following patch would result in no changes being made to the document...