/QingTingFanBianYi/src/com/alibaba/fastjson/serializer/NumberFieldSerializer.java
https://gitlab.com/qt-prometheus/qt-prometheus · Java · 40 lines · 31 code · 5 blank · 4 comment · 3 complexity · e277afa513c6f7ac9cfa41e190634c1e MD5 · raw file
- package com.alibaba.fastjson.serializer;
- import com.alibaba.fastjson.util.FieldInfo;
- final class NumberFieldSerializer extends FieldSerializer
- {
- public NumberFieldSerializer(FieldInfo paramFieldInfo)
- {
- super(paramFieldInfo);
- }
- public void writeProperty(JSONSerializer paramJSONSerializer, Object paramObject)
- throws Exception
- {
- writePrefix(paramJSONSerializer);
- writeValue(paramJSONSerializer, paramObject);
- }
- public void writeValue(JSONSerializer paramJSONSerializer, Object paramObject)
- throws Exception
- {
- paramJSONSerializer = paramJSONSerializer.getWriter();
- if (paramObject == null)
- {
- if (paramJSONSerializer.isEnabled(SerializerFeature.WriteNullNumberAsZero))
- {
- paramJSONSerializer.write('0');
- return;
- }
- paramJSONSerializer.writeNull();
- return;
- }
- paramJSONSerializer.append(paramObject.toString());
- }
- }
- /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
- * Qualified Name: com.alibaba.fastjson.serializer.NumberFieldSerializer
- * JD-Core Version: 0.6.2
- */