Describe the bug
When trying to parse invalid JSON, the parser doesn't throw ParseException but parse the JSON.
JSON:
Simple test:
public class JsonParseTest {
@Test
void testParsingJson() {
ObjectMapper objectMapper = new ObjectMapper();
assertThrows(JsonParseException.class, () -> objectMapper.readTree("{}something"));
}
}
Version information
2.13.1
To Reproduce
Just run the parsing (readTree or readValue) with incorrect JSON input as shown.
Expected behavior
Parser throws JsonParseException
Additional context
Attached simple test project:
jackson-parse-error.zip
Describe the bug
When trying to parse invalid JSON, the parser doesn't throw ParseException but parse the JSON.
JSON:
Simple test:
Version information
2.13.1
To Reproduce
Just run the parsing (
readTreeorreadValue) with incorrect JSON input as shown.Expected behavior
Parser throws JsonParseException
Additional context
Attached simple test project:
jackson-parse-error.zip