Class Diffy
java.lang.Object
com.bazaarvoice.jolt.Diffy
- Direct Known Subclasses:
ArrayOrderObliviousDiffy
JSON Diff tool that will walk two "JSON" objects simultaneously and identify mismatches.
Algorithm :
1) make a copy of both input objects
2) walk both objects and _remove_ items that match
3) return what is left of the two objects in the Result
In the case a full / "sucessful" match, Diffy returns a Result object with isEmpty() == true.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains the unmatched fields from the Diffy operation. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Diffy.ResultdiffHelper(Object expected, Object actual) protected Diffy.Resultprotected Diffy.Resultprotected Diffy.ResultdiffScalar(Object expected, Object actual) protected booleanscalarEquals(Object expected, Object actual) Allow subclasses to handle things like Long 0 versus Int 0.
-
Field Details
-
jsonUtil
-
-
Constructor Details
-
Diffy
public Diffy() -
Diffy
Pass in a custom jsonUtil to use for the cloneJson method.
-
-
Method Details
-
diff
-
diffHelper
-
diffMap
-
diffList
-
diffScalar
-
scalarEquals
-