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

https://gitlab.com/qt-prometheus/qt-prometheus · Java · 32 lines · 24 code · 4 blank · 4 comment · 3 complexity · dd990d56ed397aa7e8c536105d336f9e MD5 · raw file

  1. package com.alibaba.fastjson.serializer;
  2. import java.io.IOException;
  3. import java.lang.reflect.Type;
  4. public class AppendableSerializer
  5. implements ObjectSerializer
  6. {
  7. public static final AppendableSerializer instance = new AppendableSerializer();
  8. public void write(JSONSerializer paramJSONSerializer, Object paramObject1, Object paramObject2, Type paramType)
  9. throws IOException
  10. {
  11. if (paramObject1 == null)
  12. {
  13. paramJSONSerializer = paramJSONSerializer.getWriter();
  14. if (paramJSONSerializer.isEnabled(SerializerFeature.WriteNullStringAsEmpty))
  15. {
  16. paramJSONSerializer.writeString("");
  17. return;
  18. }
  19. paramJSONSerializer.writeNull();
  20. return;
  21. }
  22. paramJSONSerializer.write(paramObject1.toString());
  23. }
  24. }
  25. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  26. * Qualified Name: com.alibaba.fastjson.serializer.AppendableSerializer
  27. * JD-Core Version: 0.6.2
  28. */