Simplify the way to assert parse error in json tests

The advantage is that we now have a meaningful error message when no parse error is detected instead of having an empty message.

Note that one of the test about parse errors is failing for me locally (no exception thrown), which is how I detected the empty failure message