/QingTingFanBianYi/src/com/alibaba/fastjson/parser/deserializer/CharArrayDeserializer.java

https://gitlab.com/qt-prometheus/qt-prometheus · Java · 48 lines · 38 code · 6 blank · 4 comment · 6 complexity · 7ac5d105cf560a5d099088d82c5d321e MD5 · raw file

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