From c51efe8b0824362a95c8755a8c2d269da8cd0b67 Mon Sep 17 00:00:00 2001 From: rikkarth Date: Fri, 15 Mar 2024 22:55:09 +0000 Subject: [PATCH] docs(#871-strictMode): JSONArray constructor JavaDoc update --- src/main/java/org/json/JSONArray.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java index 12b1c39..014ba3c 100644 --- a/src/main/java/org/json/JSONArray.java +++ b/src/main/java/org/json/JSONArray.java @@ -85,10 +85,12 @@ public class JSONArray implements Iterable { } /** - * Construct a JSONArray from a JSONTokener. + * Constructs a JSONArray from a JSONTokener and a JSONParserConfiguration. + * JSONParserConfiguration contains strictMode turned off (false) by default. * - * @param x A JSONTokener - * @throws JSONException If there is a syntax error. + * @param x A JSONTokener instance from which the JSONArray is constructed. + * @param jsonParserConfiguration A JSONParserConfiguration instance that controls the behavior of the parser. + * @throws JSONException If a syntax error occurs during the construction of the JSONArray. */ public JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration) throws JSONException { this(); @@ -103,7 +105,7 @@ public class JSONArray implements Iterable { } if (nextChar != ']') { x.back(); - for (;;) { + for (; ; ) { if (x.nextClean() == ',') { x.back(); this.myArrayList.add(JSONObject.NULL);