<@U55LSMQ4W> there currently are no custom matcher...
# http4k
d
@mmaillot there currently are no custom matchers for JSON documents - mainly because there isn't a dependency between http4k-testing-hamkrest and the JSON format libraries. It should be really easy for you to write a custom hasBody matcher that simply marshalls the pretty string to a JSON object and then back into a compact JSON string before comparing it. Let us know if you need help with that - you can look at the existing matcher code for inspiration: https://github.com/http4k/http4k/blob/master/http4k-testing-hamkrest/src/main/kotlin/org/http4k/hamkrest/httpMessage.kt If you raise a GH issue then we can look at adding a "compactify" method into the main JSON interface (in core) - that'll allow us to write your desired matcher.