File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -454,25 +454,28 @@ public String nextTo(String delimiters) throws JSONException {
454454 */
455455 public Object nextValue () throws JSONException {
456456 char c = this .nextClean ();
457- switch ( c ) {
458- case '{' :
457+
458+ if ( c == '{' ) {
459459 this .back ();
460460 try {
461461 return new JSONObject (this , jsonParserConfiguration );
462462 } catch (StackOverflowError e ) {
463463 throw new JSONException ("JSON Array or Object depth too large to process." , e );
464464 }
465- case '[' :
465+
466+ } else if (c == '[' ) {
466467 this .back ();
467468 try {
468469 return new JSONArray (this , jsonParserConfiguration );
469470 } catch (StackOverflowError e ) {
470471 throw new JSONException ("JSON Array or Object depth too large to process." , e );
471472 }
472473 }
474+
473475 return nextSimpleValue (c );
474476 }
475477
478+
476479 Object nextSimpleValue (char c ) {
477480 String string ;
478481
@@ -482,9 +485,8 @@ Object nextSimpleValue(char c) {
482485 c == '\'' ) {
483486 throw this .syntaxError ("Strict mode error: Single quoted strings are not allowed" );
484487 }
485- switch (c ) {
486- case '"' :
487- case '\'' :
488+
489+ if (c == '"' || c == '\'' ) {
488490 return this .nextString (c );
489491 }
490492
You can’t perform that action at this time.
0 commit comments