src/main/java/com/bazaarvoice/jackson/rison/RisonParser.java
protected String _parseUnquotedFieldName(int i)
            throws IOException, JsonParseException
    {
        // Also: first char must be a valid name char, but NOT be number
        boolean firstOk = IdentifierUtils.isIdStartLenient(i);
        if (!firstOk) {
            _reportUnexpectedChar(i, "was expecting either valid name character (for unquoted name) or single-quote (for quoted) to start field name");
        }
        int ptr = _inputPtr;
        int hash = 0;
        final int inputLen = _inputEnd;

        if (ptr < inputLen) {
            do {
                int ch = _inputBuffer[ptr];
                if (!IdentifierUtils.isIdCharLenient(ch)) {
                    int start = _inputPtr-1; // -1 to bring back first char
                    _inputPtr = ptr;
                    return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
                }
                hash = (hash * 31) + ch;
                ++ptr;
            } while (ptr < inputLen);
        }
        int start = _inputPtr-1;
        _inputPtr = ptr;
        return _parseUnquotedFieldName2(start, hash);
    }
protected String _parseUnquotedFieldName(int i)
            throws IOException, JsonParseException
    {
        // Also: first char must be a valid name char, but NOT be number
        boolean firstOk = IdentifierUtils.isIdStartLenient(i);
        if (!firstOk) {
            _reportUnexpectedChar(i, "was expecting either valid name character (for unquoted name) or single-quote (for quoted) to start field name");
        }
        int ptr = _inputPtr;
        int hash = 0;
        final int inputLen = _inputEnd;

        if (ptr < inputLen) {
            do {
                int ch = _inputBuffer[ptr];
                if (!IdentifierUtils.isIdCharLenient(ch)) {
                    int start = _inputPtr-1; // -1 to bring back first char
                    _inputPtr = ptr;
                    return _symbols.findSymbol(_inputBuffer, start, ptr - start, hash);
                }
                hash = (hash * 31) + ch;
                ++ptr;
            } while (ptr < inputLen);
        }
        int start = _inputPtr-1;
        _inputPtr = ptr;
        return _parseUnquotedFieldName2(start, hash);
    }
protected String _parseUnquotedFieldName ( int i ) throws IOException , JsonParseException { // Also: first char must be a valid name char, but NOT be number boolean firstOk = IdentifierUtils . isIdStartLenient ( i ) ; if ( ! firstOk ) { _reportUnexpectedChar ( i , "was expecting either valid name character (for unquoted name) or single-quote (for quoted) to start field name" ) ; } int ptr = _inputPtr ; int hash = 0 ; final int inputLen = _inputEnd ; if ( ptr < inputLen ) { do { int ch = _inputBuffer [ ptr ] ; if ( ! IdentifierUtils . isIdCharLenient ( ch ) ) { int start = _inputPtr - 1 ; // -1 to bring back first char _inputPtr = ptr ; return _symbols . findSymbol ( _inputBuffer , start , ptr - start , hash ) ; } hash = ( hash * 31 ) + ch ; ++ ptr ; } while ( ptr < inputLen ) ; } int start = _inputPtr - 1 ; _inputPtr = ptr ; return _parseUnquotedFieldName2 ( start , hash ) ; }
Method called when we see non-white space character other
than double quote, when expecting a field name.
In standard mode will just throw an expection; but
in non-standard modes may be able to parse name.
Method called when we see non - white space character other than double quote when expecting a field name . In standard mode will just throw an expection ; but in non - standard modes may be able to parse name .