Commit c5cb313
Do not allow tokenError tokens after input if failIfExtra is set. (open-source-parsers#1014)
Currently when failIfExtra is set and strictRoot is not set,
OurReader::parse() will accept trailing non-whitespace after the JSON value
as long as the first token is not a valid JSON token. This commit changes
this to disallow any non-whitespace after the JSON value.
This commit also suppresses the "Extra non-whitespace after JSON value."
error message if parsing was aborted after another error.1 parent abcd3f7 commit c5cb313
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1060 | 1057 | | |
1061 | 1058 | | |
1062 | 1059 | | |
| |||
0 commit comments