Search in sources :

Example 16 with SymbolTable

use of com.alibaba.fastjson.parser.SymbolTable in project fastjson by alibaba.

the class JSONScannerTest_symbol method test_0.

public void test_0() throws Exception {
    SymbolTable symbolTable = new SymbolTable(512);
    JSONScanner lexer = new JSONScanner("\"name\"");
    String symbol = lexer.scanSymbol(symbolTable, '"');
    Assert.assertTrue("name".equals(symbol));
    lexer.close();
}
Also used : JSONScanner(com.alibaba.fastjson.parser.JSONScanner) SymbolTable(com.alibaba.fastjson.parser.SymbolTable)

Aggregations

SymbolTable (com.alibaba.fastjson.parser.SymbolTable)16 JSONScanner (com.alibaba.fastjson.parser.JSONScanner)15 JSONException (com.alibaba.fastjson.JSONException)2 CharsToNameCanonicalizer (com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer)1