Skip to content

Complete strictMode for JSONArray #887

@stleary

Description

@stleary

Garbage chars at the end of JSONArray docs are still allowed in strict mode. This needs to be fixed.

Here is a list of examples of JSON text strings that should be allowed in default mode, but not in strict mode. This is not an exhaustive list. Unit tests should confirm expected behavior when strictMode is true and false.

"[]asdf",
"[]]",
"[]}",
"[][",
"[]{",
"[],",
"[]:",
"[],[",
"[],{"

Note: It should not be necessary for the code to check for specific trailing chars; strict mode is violated if parsing is completed and there are still chars left in the JSONTokener instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions