You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Yin (Jira)" <ji...@apache.org> on 2023/10/19 18:56:00 UTC
[jira] [Created] (GROOVY-11200) JsonSlurper parses badly format JSON without throwing exception
John Yin created GROOVY-11200:
---------------------------------
Summary: JsonSlurper parses badly format JSON without throwing exception
Key: GROOVY-11200
URL: https://issues.apache.org/jira/browse/GROOVY-11200
Project: Groovy
Issue Type: Bug
Components: JSON
Affects Versions: 4.0.14
Reporter: John Yin
JsonSlurper should throw a JsonException when parsing the following input:
"""
{
"a":1,
"b": {
"c":2
}"""
But it parses the string successfully. On the other hand, it does throw a JsonException when parsing
"""
{
"a":1,
"b": {
"c":2
}
"""
where the ending """ is on a separate line.
I think it should fail for both.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)