If the expected and the actual object differ in things that are not visible in JSON format, hamjest prints something like
Expected: is {"a":1,"e":"2","f":{},"g":{"h":3},"k":[4,5]}
but: was {"a":1,"e":"2","f":{},"g":{"h":3},"k":[4,5]}
which is not very helpful. But it might be possible to detect this and fall back to a non-JSON description of the differences.