/QingTingFanBianYi/src/com/alibaba/fastjson/parser/deserializer/StringDeserializer.java
https://gitlab.com/qt-prometheus/qt-prometheus · Java · 47 lines · 37 code · 6 blank · 4 comment · 6 complexity · 97a12f4792a5e8707cb952f4a2bd1812 MD5 · raw file
- package com.alibaba.fastjson.parser.deserializer;
- import com.alibaba.fastjson.parser.DefaultJSONParser;
- import com.alibaba.fastjson.parser.JSONLexer;
- import java.lang.reflect.Type;
- public class StringDeserializer
- implements ObjectDeserializer
- {
- public static final StringDeserializer instance = new StringDeserializer();
- public static <T> T deserialze(DefaultJSONParser paramDefaultJSONParser)
- {
- JSONLexer localJSONLexer = paramDefaultJSONParser.getLexer();
- if (localJSONLexer.token() == 4)
- {
- paramDefaultJSONParser = localJSONLexer.stringVal();
- localJSONLexer.nextToken(16);
- return paramDefaultJSONParser;
- }
- if (localJSONLexer.token() == 2)
- {
- paramDefaultJSONParser = localJSONLexer.numberString();
- localJSONLexer.nextToken(16);
- return paramDefaultJSONParser;
- }
- paramDefaultJSONParser = paramDefaultJSONParser.parse();
- if (paramDefaultJSONParser == null)
- return null;
- return paramDefaultJSONParser.toString();
- }
- public <T> T deserialze(DefaultJSONParser paramDefaultJSONParser, Type paramType, Object paramObject)
- {
- return deserialze(paramDefaultJSONParser);
- }
- public int getFastMatchToken()
- {
- return 4;
- }
- }
- /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
- * Qualified Name: com.alibaba.fastjson.parser.deserializer.StringDeserializer
- * JD-Core Version: 0.6.2
- */