Examples of stringVal()


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

        JSONScanner lexer = new JSONScanner(text.toCharArray(), text.length());
        lexer.nextToken();

        Assert.assertEquals(0, lexer.pos());

        lexer.stringVal();

        // Assert.assertEquals("\"\\\\\\/\\b\\f\\n\\r\\t中\"",
        // JSON.toJSONString(stringVal));

    }
View Full Code Here

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

    public void test_string() throws Exception {
        {
            JSONScanner lexer = new JSONScanner("\'中国\'");
            lexer.config(Feature.AllowSingleQuotes, true);
            lexer.nextToken();
            Assert.assertEquals("中国", lexer.stringVal());
        }
        {
            JSONScanner lexer = new JSONScanner("'中国\t\\'\\\"'");
            lexer.config(Feature.AllowSingleQuotes, true);
            lexer.nextToken();
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.