fastjson 咨询一下,SerializerFeatures未引用PrettyFormat,Long使用ToStringSerializer,无法使用,

piv4azn7  于 2021-11-27  发布在  Java
关注(0)|答案(0)|浏览(200)
fastJsonConfig.setSerializerFeatures(
            SerializerFeature.DisableCircularReferenceDetect,
            SerializerFeature.WriteEnumUsingToString,
            SerializerFeature.WriteDateUseDateFormat,
            SerializerFeature.WriteNullStringAsEmpty,
            SerializerFeature.WriteNullListAsEmpty,
            SerializerFeature.WriteNullNumberAsZero,
            SerializerFeature.WriteNullBooleanAsFalse,
            SerializerFeature.QuoteFieldNames);        

    fastJsonConfig.getSerializeConfig().put(BigInteger.class, ToStringSerializer.instance);
    fastJsonConfig.getSerializeConfig().put(Long.class, ToStringSerializer.instance);
    fastJsonConfig.getSerializeConfig().put(Long.TYPE, ToStringSerializer.instance);

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题