/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

  1. package com.alibaba.fastjson.parser.deserializer;
  2. import com.alibaba.fastjson.parser.DefaultJSONParser;
  3. import com.alibaba.fastjson.parser.JSONLexer;
  4. import java.lang.reflect.Type;
  5. public class StringDeserializer
  6. implements ObjectDeserializer
  7. {
  8. public static final StringDeserializer instance = new StringDeserializer();
  9. public static <T> T deserialze(DefaultJSONParser paramDefaultJSONParser)
  10. {
  11. JSONLexer localJSONLexer = paramDefaultJSONParser.getLexer();
  12. if (localJSONLexer.token() == 4)
  13. {
  14. paramDefaultJSONParser = localJSONLexer.stringVal();
  15. localJSONLexer.nextToken(16);
  16. return paramDefaultJSONParser;
  17. }
  18. if (localJSONLexer.token() == 2)
  19. {
  20. paramDefaultJSONParser = localJSONLexer.numberString();
  21. localJSONLexer.nextToken(16);
  22. return paramDefaultJSONParser;
  23. }
  24. paramDefaultJSONParser = paramDefaultJSONParser.parse();
  25. if (paramDefaultJSONParser == null)
  26. return null;
  27. return paramDefaultJSONParser.toString();
  28. }
  29. public <T> T deserialze(DefaultJSONParser paramDefaultJSONParser, Type paramType, Object paramObject)
  30. {
  31. return deserialze(paramDefaultJSONParser);
  32. }
  33. public int getFastMatchToken()
  34. {
  35. return 4;
  36. }
  37. }
  38. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  39. * Qualified Name: com.alibaba.fastjson.parser.deserializer.StringDeserializer
  40. * JD-Core Version: 0.6.2
  41. */