Open cloudshiftchris opened 2 years ago
There was a similar issue: https://github.com/robfletcher/strikt/issues/75
Looks like it was fixed (https://github.com/robfletcher/strikt/pull/80), but then jackson team removed toString()
from ObjectNode
, and preferToString()
does not help anymore: https://github.com/FasterXML/jackson-databind/commit/8ec1e5ecfc07ad893bd4e8d151d9176795f4dc41
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.