-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
From #927:
What is the purpose of JSONParserConfiguration parameter in JSONArray/JSONObject constructors? Is it not enough to use JSONTokener's JSONParserConfiguration? For example, when calling "JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)" constructor the array syntax is checked according to jsonParserConfiguration parameter, but nested objects/arrays syntax is checked according to JSONTokener's configuration. It seems a bit inconsistent.
Both the JSONArray/JSONObject instance and the JSONTokener parameter already have a JSONParserConfiguration. Only one of these should be used. I am leaning towards replacing the JSONTokener config instance with the config param. This should also be called out in the JavaDocs for the corresponding constructors.