66public class JSONParserConfiguration extends ParserConfiguration {
77
88 /** Original Configuration of the JSON Parser. */
9- public static final JSONParserConfiguration ORIGINAL
10- = new JSONParserConfiguration ();
9+ public static final JSONParserConfiguration ORIGINAL = new JSONParserConfiguration ();
1110
1211 /** Original configuration of the JSON Parser except that values are kept as strings. */
13- public static final JSONParserConfiguration KEEP_STRINGS
14- = new JSONParserConfiguration ().withKeepStrings (true );
12+ public static final JSONParserConfiguration KEEP_STRINGS = new JSONParserConfiguration ().withKeepStrings (true );
1513
1614 /**
1715 * Used to indicate whether to overwrite duplicate key or not.
@@ -97,24 +95,6 @@ public JSONParserConfiguration withStrictMode(final boolean mode) {
9795 return clone ;
9896 }
9997
100- /**
101- * Allows single quotes mode configuration for JSON parser when strictMode is on.
102- * <p>
103- * If this option is set to true when strict Mode is enabled, the parser will allow single quoted fields.
104- * <p>
105- * This option is false by default.
106- *
107- * @param mode a boolean value indicating whether single quotes should be allowed or not
108- * @return a new JSONParserConfiguration instance with the updated strict mode setting
109- */
110- public JSONParserConfiguration allowSingleQuotes (final boolean mode ) {
111- JSONParserConfiguration clone = this .clone ();
112- clone .strictMode = this .strictMode ;
113- clone .allowSingleQuotes = mode ;
114-
115- return clone ;
116- }
117-
11898 /**
11999 * The parser's behavior when meeting duplicate keys, controls whether the parser should
120100 * overwrite duplicate keys or not.
@@ -138,14 +118,4 @@ public boolean isOverwriteDuplicateKey() {
138118 public boolean isStrictMode () {
139119 return this .strictMode ;
140120 }
141-
142- /**
143- * Retrieves the allow single quotes option.
144- * <p>
145- * Allow Single Quotes, when enabled during strict mode, instructs the parser to allow single quoted JSON fields.
146- * The parser will not throw a JSONException if compliant single quoted fields are found in the JSON structure.
147- *
148- * @return the current allow single quotes setting.
149- */
150- public boolean isAllowSingleQuotes () {return this .allowSingleQuotes ;}
151121}
0 commit comments