Adds tests for JSON errors