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
I couldn't find a way to ignore properties that don't exist in the actual object during recursive comparison. Adding the ignored fields with dummy values to the actual object and setting ignoreFields works. Is there a way to skip non-existing properties?
This can't be supported as JsonNode is an iterable and the recursive comparison compares iterables by looking at their content since the 2 json nodes have different size (3 vs 1) the comparison fails.
JsonNode and all subtype nodes don't work well with the recursive comparison as everything is an iterable, the recursive comparison won't never compare the node values (for example IntNode has a _value field but it is not compared as the recursive comparison treats it as an iterable which is empty is this case).
Summary
I couldn't find a way to ignore properties that don't exist in the actual object during recursive comparison. Adding the ignored fields with dummy values to the actual object and setting
ignoreFields
works. Is there a way to skip non-existing properties?Example
The text was updated successfully, but these errors were encountered: