bruth / jsonpatch-js

A JavaScript implementation of the JSON Media Type for partial modifications: http://tools.ietf.org/html/rfc6902
http://bruth.github.io/jsonpatch-js
BSD 2-Clause "Simplified" License
181 stars 24 forks source link

Generating JSON Patch Doc #11

Closed joshua-mcginnis closed 10 years ago

joshua-mcginnis commented 10 years ago

Hi - thanks for building this. It's been really helpful in my initial implementation of PATCH to our applications.

Have you considered building a method that will return a proper patch document so that clients don't have to manually build it? I was thinking it would look something like:

jsonpatch.create(originalDoc, changedDoc); // outputs the patch doc

Or if you have other ideas or links to other libs that do this, that'd be welcomed.

This would be extremely helpful and close the loop on my implementation.

bruth commented 10 years ago

Thanks. I wrote the original implementation for the code in this repo: https://github.com/aogriffiths/jsondiff-js for generating diffs.

joshua-mcginnis commented 10 years ago

Perfect. Thanks!