PageRenderTime 54ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/QingTingFanBianYi/src/com/alibaba/fastjson/serializer/CharacterSerializer.java

https://gitlab.com/qt-prometheus/qt-prometheus
Java | 33 lines | 25 code | 4 blank | 4 comment | 4 complexity | 802bc383b5001eeac78190f9b7449bc0 MD5 | raw file
  1. package com.alibaba.fastjson.serializer;
  2. import java.io.IOException;
  3. import java.lang.reflect.Type;
  4. public class CharacterSerializer
  5. implements ObjectSerializer
  6. {
  7. public static final CharacterSerializer instance = new CharacterSerializer();
  8. public void write(JSONSerializer paramJSONSerializer, Object paramObject1, Object paramObject2, Type paramType)
  9. throws IOException
  10. {
  11. paramJSONSerializer = paramJSONSerializer.getWriter();
  12. paramObject1 = (Character)paramObject1;
  13. if (paramObject1 == null)
  14. {
  15. paramJSONSerializer.writeString("");
  16. return;
  17. }
  18. if (paramObject1.charValue() == 0)
  19. {
  20. paramJSONSerializer.writeString("");
  21. return;
  22. }
  23. paramJSONSerializer.writeString(paramObject1.toString());
  24. }
  25. }
  26. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  27. * Qualified Name: com.alibaba.fastjson.serializer.CharacterSerializer
  28. * JD-Core Version: 0.6.2
  29. */