Skip to content

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

Merged
merged 1 commit into from
Apr 9, 2013
Merged

Add proposed Factorizing JSON Diff implementation #1

merged 1 commit into from
Apr 9, 2013

Conversation

rwatler
Copy link
Contributor

@rwatler rwatler commented Apr 9, 2013

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.

@fge
Copy link
Collaborator

fge commented Apr 9, 2013

Wow, I didn't expect the implementation to go that far!

Studying the code...

@fge
Copy link
Collaborator

fge commented Apr 9, 2013

About the copyright of the file, which name and mail address do you want me to put in the copyright notice?

@fge fge closed this Apr 9, 2013
@fge fge reopened this Apr 9, 2013
fge added a commit that referenced this pull request Apr 9, 2013
Add proposed Factorizing JSON Diff implementation
@fge fge merged commit 13fe9c4 into java-json-tools:master Apr 9, 2013
@rwatler
Copy link
Contributor Author

rwatler commented Apr 9, 2013

On the copyright... this is a donation to your project, so copyright as you deem fit. You can use "Randy Watler", "[email protected]".

@fge
Copy link
Collaborator

fge commented Apr 9, 2013

OK, copyright added. Thanks again for the implementation! I still don't understand too much of it though ;)

fge added a commit that referenced this pull request Apr 12, 2013
* 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
stephanedaviet pushed a commit to stephanedaviet/json-patch that referenced this pull request Apr 6, 2019
Adding a public accessor to JsonPatch to retrieve the contained operation and path
BartekGravity referenced this pull request in gravity9-tech/json-patch-path Jun 20, 2023
* 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
BartekGravity referenced this pull request in gravity9-tech/json-patch-path Jun 20, 2023
[US642] Update project settings (#3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants