class NullValueSerializer extends JsonSerializer<Object> {
    private JsonProps jsonProps;
    public Class<?> type0;

    public NullValueSerializer(JsonProps jsonProps) {
        this.jsonProps = jsonProps;
    }

    public NullValueSerializer(JsonProps jsonProps, final JavaType type) {
        this.jsonProps = jsonProps;
        this.type0 = type == null ? Object.class : type.getRawClass();
    }

    @Override
    public void serialize(Object o, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException {<FILL_FUNCTION_BODY>}
}

        Class<?> type = type0;

        if (type == null) {
            try {
                if(gen.getCurrentValue() != null) {
                    String fieldName = gen.getOutputContext().getCurrentName();
                    Field field = gen.getCurrentValue().getClass().getDeclaredField(fieldName);
                    type = field.getType();
                }
            } catch (NoSuchFieldException e) {
            }
        }

        if (type != null) {
            if (jsonProps.nullStringAsEmpty && type == String.class) {
                gen.writeString("");
                return;
            }

            if (jsonProps.nullBoolAsFalse && type == Boolean.class) {
                if (jsonProps.boolAsInt) {
                    gen.writeNumber(0);
                } else {
                    gen.writeBoolean(false);
                }
                return;
            }

            if (jsonProps.nullNumberAsZero && Number.class.isAssignableFrom(type)) {
                if(jsonProps.longAsString && type == Long.class){
                    gen.writeString("0");
                }else{
                    if (type == Long.class) {
                        gen.writeNumber(0L);
                    } else if (type == Double.class) {
                        gen.writeNumber(0D);
                    } else if (type == Float.class) {
                        gen.writeNumber(0F);
                    } else {
                        gen.writeNumber(0);
                    }
                }

                return;
            }

            if (jsonProps.nullArrayAsEmpty) {
                if (Collection.class.isAssignableFrom(type) || type.isArray()) {
                    gen.writeStartArray();
                    gen.writeEndArray();
                    return;
                }
            }
        }

        gen.writeNull();
    
<methods>public void <init>() ,public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, com.fasterxml.jackson.databind.JavaType) throws com.fasterxml.jackson.databind.JsonMappingException,public JsonSerializer<?> getDelegatee() ,public Class<java.lang.Object> handledType() ,public boolean isEmpty(java.lang.Object) ,public boolean isEmpty(com.fasterxml.jackson.databind.SerializerProvider, java.lang.Object) ,public boolean isUnwrappingSerializer() ,public Iterator<com.fasterxml.jackson.databind.ser.PropertyWriter> properties() ,public JsonSerializer<java.lang.Object> replaceDelegatee(JsonSerializer<?>) ,public abstract void serialize(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider) throws java.io.IOException,public void serializeWithType(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer) throws java.io.IOException,public JsonSerializer<java.lang.Object> unwrappingSerializer(com.fasterxml.jackson.databind.util.NameTransformer) ,public boolean usesObjectId() ,public JsonSerializer<?> withFilterId(java.lang.Object) <variables>