“ fastjson 2.0.47 发布,大幅提升 Android 版首次序列化/反序列化性能 ”

发布时间:2024-02-26
今日阅读:0
来源:OSCHINA
作者:wenshao
...

这个版本主要是大幅度提升android版本的首次序列化/反序列化的性能。在序列化大约1M的JSON对象时性能也有了较大提升。

Issues

  • 在非android版本某些Android设备上处理数据时崩溃#2263
  • JSONField Annotation defaultValue配置支持Enum#2239
  • 修复反序列化List类型字段输入null时报错的问题#2233
  • 修复反序列化时JSON.toJavaObject方法有错误识别setter方法的问题#2230
  • 修复引用类型、Boolean、Short 不支持JSONWriter.Feature.WriteNulls#2234
  • 修复序列化kotlin data cass调用copy方法的问题#2231
  • 修复有些场景JSON.isValid方法抛异常的问题#2222
  • 修复JSONPath不支持中划线的问题#2228
  • 提升android下首次序列化的性能#2189

    MAVEN依赖配置

    <dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2</artifactId>
    <version>2.0.47</version>
    </dependency>
    
  • android5针对优化版本 这个版本和android4兼容版本基本一致,只是使用了java.nio.charset.StandardCharsets,后续将会不再升级android4兼容版本。

    <dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2</artifactId>
    <version>2.0.47.android5</version>
    </dependency>
    
  • android8针对优化版本 这个版本支持java.time和Optional

    <dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2</artifactId>
    <version>2.0.47.android8</version>
    </dependency>
    
  • 1.x 兼容版本

    <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>2.0.47</version>
    </dependency>
    
  • Spring 5 extension配置

    <dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2-extension-spring5</artifactId>
    <version>2.0.47</version>
    </dependency>
    
  • Spring 6 extension配置

    <dependency>
    <groupId>com.alibaba.fastjson2</groupId>
    <artifactId>fastjson2-extension-spring6</artifactId>
    <version>2.0.47</version>
    </dependency>
    

    相关链接

  • FASTJSON 1.x用户升级指南https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn

  • 相关issueshttps://github.com/alibaba/fastjson2/milestone/47

  • 代码taghttps://github.com/alibaba/fastjson2/tree/2.0.47

  • Maven下载https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.47/

  • Android5特别优化版本https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.47.android5/

  • Android8特别优化版本https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.47.android8/

  • 1.x兼容版本https://repo1.maven.org/maven2/com/alibaba/fastjson/2.0.47/

  • 性能测试报告https://github.com/alibaba/fastjson2/blob/main/docs/benchmark/benchmark_2.0.47.md

每日一言

"<!doctype html> <html lang="Zh-cn"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex,nofollow"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="renderer" content="webkit"> <title>您请求的文件不存在!</title> <link type="text/css" rel="stylesheet" href="https://www.oick.cn/css/404.css" /> <link rel="shortcut icon" href="http://www.oick.cn/favicon.ico" type="image/x-icon" /> </head> <body> <div id="wrap"> <div> <img src="https://www.oick.cn/imgs/404.png" alt="404" /> </div> <div id="text"> <strong> <span></span> <a href="javascript:history.back()">返回上一页</a> </strong> </div> </div> <div class="animate below"></div> <div class="animate above"></div> </body> </html>"

...

站点统计

本周更新文章: 0 篇
文章总数: 59110 篇
今日访问量: 23253 次
访问总量: 183400 次