-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Strict mode now works for JSONArray (see #877), but not for JSONObject or for JSONArrays embedded in JSONObjects.
For example, the following code parses without error:
String str = "{\"a\": [b]}";
JSONObject jsonObject = new JSONObject(str, new JSONParserConfiguration().withStrictMode(true));
Several additional changes should be included with the PR:
- The indentation in nextString(char, boolean) is incorrect.
There is a compiler warning in JSONTokener that should be fixed:(fixed in add javadoc for strictmode #886)
Warning: Javadoc Warnings
Warning: /home/runner/work/JSON-java/JSON-java/src/main/java/org/json/JSONTokener.java:294: warning: no @param for strictMode
Warning: public String nextString(char quote, boolean strictMode) throws JSONException {
Warning: ^
Warning: [WARNING] 1 warning
Metadata
Metadata
Assignees
Labels
No labels