Package com.alibaba.fastjson.parser

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


                break;
            }

            String value;
            if (lexer.token() == JSONToken.LITERAL_STRING) {
                value = lexer.stringVal();
                lexer.nextToken(JSONToken.COMMA);
            } else {
                Object obj = parser.parse();
                if (obj == null) {
                    value = null;
View Full Code Here


                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

            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

                }
            } 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

                }
            } 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

                }
            } else if (key == JSON.DEFAULT_TYPE_KEY) {
                if (lexer.token() == JSONToken.NULL) {
                    // skip
                } else if (lexer.token() == JSONToken.LITERAL_STRING) {
                    String elementType = lexer.stringVal();
                    if (!elementType.equals("java.lang.StackTraceElement")) {
                        throw new JSONException("syntax error : " + elementType);   
                    }
                } else {
                    throw new JSONException("syntax error");
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.