When I use Json4s 3.2.9 native, I get a stacktrace every time it parses bad JSON in Scala. I have tests where I make sure that invalid JSON is treated correctly and now the stacktraces clutter my tests -.-, can I turn this off, or can I change to json4s jackson and turn it off?
You can use parseOpt
which does not print anything and returns an Option
. In case parsing failed, it returns None
.