FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add flag to not generate Move or Copy operations. by bdwdax · Pull Request #81 · java-json-tools/json-patch · GitHub

add flag to not generate Move or Copy operations. - #81

Open
bdwdax wants to merge 5 commits into
java-json-tools:masterfrom
bdwdax:master
Open

add flag to not generate Move or Copy operations.#81
bdwdax wants to merge 5 commits into
java-json-tools:masterfrom
bdwdax:master

Conversation

bdwdax commented Aug 28, 2020
edited
Loading

Copy link
Copy Markdown

I need a patch without reference to the json source.

Related to issue #46

huggsboson commented Sep 1, 2020
edited
Loading

Copy link
Copy Markdown
Member

Can you rename the param from "moveOrCopy" to "diffDoentRequireSource" or something more semantic about what is trying to be achieved. i.e. we shouldn't include test as well if that ever came up.

bdwdax commented Sep 4, 2020

Copy link
Copy Markdown
Author

Done. I'm not sure I have understand what you say about test.

Maybe I should create an option objet that could evolve, rather than a boolean directly in constructor ?

Copy link
Copy Markdown

A boolean paramter to determine behaviour might be a code smell.

I was thinking of solving this in a different way by extracting an interface from DiffProcessor with two implementations SourcedDiffProcessor and SourcelessDiffProcessor ( maybe the names could be better ) with two well defined static factory methods in the JsonDiff class.

bdwdax commented Sep 24, 2020

Copy link
Copy Markdown
Author

@huggsboson I create a DiffOptions class and a builder, to pass 'diffDoentRequireSource' option, I think it's more flexible.

Build don't pass, there is a problem with a gradle dependency : http://repo.springsource.org/plugins-release/org/springframework/build/gradle/propdeps-plugin/0.0.7/propdeps-plugin-0.0.7.pom are only accessible on https. I don't know how to solve this, and I think is not reliable directly to my PR or the java-json-tool project.



public static JsonNode asJson(final JsonNode source, final JsonNode target, final boolean withMoveOrCopyOperation)
public static JsonNode asJson(final JsonNode source, final JsonNode target, DiffOptions options)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

options param should be final

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done

bdwdax commented Sep 24, 2020

Copy link
Copy Markdown
Author

A boolean paramter to determine behaviour might be a code smell.

I was thinking of solving this in a different way by extracting an interface from DiffProcessor with two implementations SourcedDiffProcessor and SourcelessDiffProcessor ( maybe the names could be better ) with two well defined static factory methods in the JsonDiff class.

could you show us your idea ?

techanon commented Dec 7, 2021

Copy link
Copy Markdown

I'd like to see this feature become available. Is there anything else still needed for this?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL