Giter Site home page Giter Site logo

f3z0 / jsonpatch.js Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 120 KB

A class allowing the application of JSON Patch Documents corresponding to: draft-pbryan-json-patch-04 http://tools.ietf.org/html/draft-pbryan-json-patch-04 with the addition of 'value' in 'remove' operation and 'replacedValue' in 'replace' operation. These additions allow for both forward and reverse JSON patching.

jsonpatch.js's People

Stargazers

 avatar  avatar

jsonpatch.js's Issues

JSON Pointer tokens containing '/' characters support requirement.

Per Paul (working draft author):

I believe your pointer implementation will not handle objects with member names containing slash '/' characters. I wouldn't do anything about this until the next JSON Pointer draft is published; we're going to change the way we represent such member names in pointers.

Greg:
Need to URI percent decode prior to key lookup on JSON object.

Need remove/add/replace operation support on the root value.

Per Paul (working draft author):

I see you're avoiding the remove/add/replace operations on the root value. I would document this as a limitation, as the specification makes these operations are valid to apply to the root object. If you can work around such limitations, that would be better.

Other ways to handle bi-directional support without new meta values in replace/remove operations.

Per Paul (working draft author):

I'm curious if there are other ways you could undo patches without needing to store removed/replaced value. For example, your runPatch function could generated and return an "undo" patch document that effectively undoes the work of the patch it's applying.

Greg:
Bandwidth considerations needed for 'undo' patch. Looking for more feedback from peers on this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.