protected Object parse(final String name) {
        Object value = null;
        char current = get();

        switch (current) {
            // null
            case 'n':
                read('n');
                read('u');
                read('l');
                read('l');
                value = null;
                break;
            // NaN
            case 'N':
                read('N');
                read('a');
                read('N');
                value = Double.NaN;
                break;
            // true
            case 't':
                read('t');
                read('r');
                read('u');
                read('e');
                value = true;
                break;
            // false
            case 'f':
                read('f');
                read('a');
                read('l');
                read('s');
                read('e');
                value = false;
                break;
            // string
            case '\'':
            case '\"':
                value = parseString(true);
                break;
            // number
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            case '+':
            case '-':
                value = parseNumber();
                break;
            // array
            case '[':
                value = parseArray(name);
                break;
            // object
            case '{':
                value = parseObject(name);
                break;
            default:
                throw new JSONParseException(s, pos);
        }
        return value;
    }
protected Object parse(final String name) {
        Object value = null;
        char current = get();

        switch (current) {
            
            case 'n':
                read('n');
                read('u');
                read('l');
                read('l');
                value = null;
                break;
            
            case 'N':
                read('N');
                read('a');
                read('N');
                value = Double.NaN;
                break;
            
            case 't':
                read('t');
                read('r');
                read('u');
                read('e');
                value = true;
                break;
            
            case 'f':
                read('f');
                read('a');
                read('l');
                read('s');
                read('e');
                value = false;
                break;
            
            case '\'':
            case '\"':
                value = parseString(true);
                break;
            
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            case '+':
            case '-':
                value = parseNumber();
                break;
            
            case '[':
                value = parseArray(name);
                break;
            
            case '{':
                value = parseObject(name);
                break;
            default:
                throw new JSONParseException(s, pos);
        }
        return value;
    }
protected Object parse ( final String name ) { Object value = null ; char current = get ( ) ; switch ( current ) { // null case ' ' : read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; value = null ; break ; // NaN case ' ' : read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; value = Double . NaN ; break ; // true case ' ' : read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; value = true ; break ; // false case ' ' : read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; read ( ' ' ) ; value = false ; break ; // string case ' ' : case ' ' : value = parseString ( true ) ; break ; // number case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : value = parseNumber ( ) ; break ; // array case ' ' : value = parseArray ( name ) ; break ; // object case ' ' : value = parseObject ( name ) ; break ; default : throw new JSONParseException ( s , pos ) ; } return value ; }
Parse an unknown type.

@return Object the next item
@throws JSONParseException if invalid JSON is found
Parse an unknown type .