You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var expected = "[\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\"]";
var actual = "[\"b\",\"a\",\"d\",\"c\",\"e\",\"f\",\"g\",\"h\"]";
var diff = JsonDiff.asJson(Json.node(expected), Json.node(actual), EnumSet.of(DiffFlags.OMIT_COPY_OPERATION));
pjungermann
changed the title
Improve JsonDiff#compactDiffs by also considering replace
FeatureRequest: Improve JsonDiff#compactDiffs by also considering replace
Nov 29, 2019
As I understand, the way we compact transformations prioritizes replace, move and copy respectively.
I will run some tests when I get some time, but I think it is possible to make an API where people can choose the "method" that they want to prioritize. Making some general rule would make Diffing more costly than it already is, and we still would not cover all people preferences, so I think the best course of action would be exposing a "compact order" API or something similar.
Expected Behavior
only move operations
Actual Behavior
1 remove, 1 replace, 1 add operation
Steps to Reproduce the Problem
Specifications
Library Version: 0.4.4
Language (e.g. Java 1.8, Scala, etc): Java 11
I found this behavior while trying to understand and debug wiremock/wiremock#1230
The text was updated successfully, but these errors were encountered: