Examples of stringVal()


Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                break;
            }

            String key;
            if (lexer.token() == JSONToken.LITERAL_STRING) {
                key = lexer.stringVal();
                lexer.nextTokenWithColon(JSONToken.LITERAL_INT);
            } else {
                throw new JSONException("syntax error");
            }
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

            }


            if (key.equalsIgnoreCase("name")) {
                if (lexer.token() == JSONToken.LITERAL_STRING) {
                    name = lexer.stringVal();
                    lexer.nextToken();
                } else {
                    throw new JSONException("syntax error");
                }
            } else if (key.equalsIgnoreCase("style")) {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                break;
            }

            String key;
            if (lexer.token() == JSONToken.LITERAL_STRING) {
                key = lexer.stringVal();
                lexer.nextTokenWithColon(JSONToken.LITERAL_INT);
            } else {
                throw new JSONException("syntax error");
            }
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                if (lexer.token() == JSONToken.LITERAL_STRING && lexer.isRef()) {
                    Object object = null;

                    lexer.nextTokenWithColon(JSONToken.LITERAL_STRING);
                    if (lexer.token() == JSONToken.LITERAL_STRING) {
                        String ref = lexer.stringVal();
                        if ("..".equals(ref)) {
                            ParseContext parentContext = context.getParentContext();
                            object = parentContext.getObject();
                        } else if ("$".equals(ref)) {
                            ParseContext rootContext = context;
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                    return object;
                }

                if (map.size() == 0 //
                    && lexer.token() == JSONToken.LITERAL_STRING //
                    && JSON.DEFAULT_TYPE_KEY.equals(lexer.stringVal())) {
                    lexer.nextTokenWithColon(JSONToken.LITERAL_STRING);
                    lexer.nextToken(JSONToken.COMMA);
                    if (lexer.token() == JSONToken.RBRACE) {
                        lexer.nextToken();
                        return map;
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                if (e == null) {
                    throw new JSONException("parse enum " + enumClass.getName() + " error, value : " + value);
                }
                return e;
            } else if (lexer.token() == JSONToken.LITERAL_STRING) {
                String strVal = lexer.stringVal();
                lexer.nextToken(JSONToken.COMMA);

                if (strVal.length() == 0) {
                    return (T) null;
                }
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

            lexer.nextTokenWithColon(JSONToken.LITERAL_STRING);
            if (key == "className") {
                if (lexer.token() == JSONToken.NULL) {
                    declaringClass = null;
                } else if (lexer.token() == JSONToken.LITERAL_STRING) {
                    declaringClass = lexer.stringVal();
                } else {
                    throw new JSONException("syntax error");
                }
            } else if (key == "methodName") {
                if (lexer.token() == JSONToken.NULL) {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

   
    @SuppressWarnings("unchecked")
    public static <T> T deserialze(DefaultJSONParser parser) {
        final JSONLexer lexer = parser.getLexer();
        if (lexer.token() == JSONToken.LITERAL_STRING) {
            String val = lexer.stringVal();
            lexer.nextToken(JSONToken.COMMA);
            return (T) val;
        }
       
        if (lexer.token() == JSONToken.LITERAL_INT) {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                }
            } else if (key == "methodName") {
                if (lexer.token() == JSONToken.NULL) {
                    methodName = null;
                } else if (lexer.token() == JSONToken.LITERAL_STRING) {
                    methodName = lexer.stringVal();
                } else {
                    throw new JSONException("syntax error");
                }
            } else if (key == "fileName") {
                if (lexer.token() == JSONToken.NULL) {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONLexer.stringVal()

                }
            } else if (key == "fileName") {
                if (lexer.token() == JSONToken.NULL) {
                    fileName = null;
                } else if (lexer.token() == JSONToken.LITERAL_STRING) {
                    fileName = lexer.stringVal();
                } else {
                    throw new JSONException("syntax error");
                }
            } else if (key == "lineNumber") {
                if (lexer.token() == JSONToken.NULL) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.