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
Comparing Jackson JsonNode objects is useful more matching up JSON, sidestepping formatting and key-order considerations.
When doing expectThat(actualNode).isEqualTo(expectedNode) the comparison works as expected, however the failure output (when the nodes do not match) doesn't properly show the toString() of the nodes.
▼ Expect that [CdkResource(name=SecureBucket1ED1C5CE, type=AWS::S3::Bucket)]:
✓ has only one element
▼ single element CdkResource(name=SecureBucket1ED1C5CE, type=AWS::S3::Bucket):
▼ [[[], [[[[[[]]]]], [[], [], [], []]], [], []]]:
✗ is equal to [[[], [[[[[[]]]]], [[], [], [], []]], [], []]] (ObjectNode)
found [[[], [[[[[[]]]]], [[], [], [], []]], [], []]] (ObjectNode)
Suspect this is related to the formatValue() method, given that JsonNode implements Iterable.
Expected behaviour: show the toString() output of the JsonNode objects
strikt 0.34.1. Issue occurs with or without strikt-jackson module.
The text was updated successfully, but these errors were encountered:
There was a similar issue: #75
Looks like it was fixed (#80), but then jackson team removed toString() from ObjectNode, and preferToString() does not help anymore: FasterXML/jackson-databind@8ec1e5e
Comparing Jackson JsonNode objects is useful more matching up JSON, sidestepping formatting and key-order considerations.
When doing
expectThat(actualNode).isEqualTo(expectedNode)
the comparison works as expected, however the failure output (when the nodes do not match) doesn't properly show the toString() of the nodes.Suspect this is related to the
formatValue()
method, given that JsonNode implements Iterable.Expected behaviour: show the toString() output of the JsonNode objects
strikt 0.34.1. Issue occurs with or without strikt-jackson module.
The text was updated successfully, but these errors were encountered: