Skip to content

fastjson-1.2.11 BugFix性能提升,BeanToArray模式性能超越probuf

Compare
Choose a tag to compare
@wenshao wenshao released this 02 May 07:26
· 2437 commits to master since this release

Bug Fixed

  1. 修复在某些场景下,List<String>字段序列化后结果不对的问题。这问题因1.2.10优化引起,在此版本1.2.11中修复。
  2. 修复FastJsonHttpMessageConverter和spring 4.x版本不兼容的问题 Issue591 Issue574 Issue577

功能增强

  1. 新增Class Level SerializeSerializeFilter功能,允许将SerializeSerializeFilter注册到Class级别
  2. JSON类新增API,parseObject对InputStream直接支持。https://github.com/alibaba/fastjson/wiki/JSON_parseObject_InputStream_cn
  3. JSON类新增API writeJSONString对OutputStream/Writer直接支持。https://github.com/alibaba/fastjson/wiki/JSON_writeJSONString_cn
  4. JSONType新增加seeAlso配置,类似JAXB中的XmlSeeAlso,允许输出更短的className名称。https://github.com/alibaba/fastjson/wiki/JSONType_seeAlso_cn
  5. 增强对BeanToArray模式的支持
  6. 序列化支持新特性IgnoreErrorGetter,启用后忽略报错的getter方法

性能提升

在fastjson-1.2.11版本中,序列化性能有了很大提升,总体性能远超过jackson的普通模式和afterburn模式。BeanToArray模式的提升更是明显,在BeanToArray模式下,eishay的测试已经超越protobuf。具体测试报告看这里 https://github.com/alibaba/fastjson/wiki/Benchmark_1_2_11

相关链接