-
Notifications
You must be signed in to change notification settings - Fork 191
Add proposed Factorizing JSON Diff implementation #1
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
Conversation
Wow, I didn't expect the implementation to go that far! Studying the code... |
About the copyright of the file, which name and mail address do you want me to put in the copyright notice? |
Add proposed Factorizing JSON Diff implementation
On the copyright... this is a donation to your project, so copyright as you deem fit. You can use "Randy Watler", "[email protected]". |
OK, copyright added. Thanks again for the implementation! I still don't understand too much of it though ;) |
* New diff implementation (courtesy of Randy Watler) * Mark old diff implementation as deprecated Francis Galiegue (26): Announce version 1.1 Merge pull request #1 from rwatler/factorizing-diff Update copyrights Changes to pom.xml: add contributors JsonFactorizingDiff: modify a little JsonFactorizingDiff: modify more code JsonFactorizingDiff: more modifications JsonFactorizingDiff: replace Integer.MAX_VALUE with -1 for "not array index" JsonFactorizingDiff: more changes JsonFactorizingDiff: more changes JsonFactorizingDiff: refactor DiffOperation Add comments in DiffOperation JsonFactorizingDiff: implement .toString() on Diff{,Operation} JsonDiff: some code simplification JsonFactorizingDiff: take advantage of ArrayNode's properties JsonFactorizingDiff: refactor getLCSDiffs a little Update README Update README again Merge pull request #2 from rwatler/master Merge pull request #3 from rwatler/master JsonFactorizingDiff: add comments Move JsonFactorizingDiff into its own package Add javadoc to new JsonDiff implementation; obsolete old one. Schedule old JSON diff removal for 1.3, not 1.4 pom.xml: remove unused javadoc link 1.2 Randy Watler (3): Add proposed Factorizing JSON Diff implementation Revise factorizing implementation and test cases to cover multiple overlapping add/remove diff array index adjustments Add factorizing support for converting duplicate add to copy operations
Adding a public accessor to JsonPatch to retrieve the contained operation and path
* Add tests from spec TMF630 * Replace JsonPointer with JsonPath in Add operation * Replace JsonPointer with JsonPath in Replace operation * Replace JsonPointer with JsonPath in Remove operation * Refactor library to use String instead of JsonPointer * Format if statements * Add missing final keyword to some vals * Add comments in not active tests * Extract regex constants
[US642] Update project settings (#3)
New files committed to branch for your review:
new file: src/main/java/com/github/fge/jsonpatch/JsonFactorizingDiff.java
new file: src/test/java/com/github/fge/jsonpatch/JsonFactorizingDiffTest.java
new file: src/test/resources/jsonpatch/factorizing-diff.json
Test case data includes all tests from diff.json with added tests that highlight factorized move operations. There are also a few minor differences in generated patch operations for the tests common to both data files. Compare factorizing-diff.json to diff-json to review.