FASTJSON v2
is an important upgrade of the FASTJSON
project, aimed at providing a high-performance JSON
library for the next decade. With the same API
,
JSON/JSONB
protocols, with JSONPath
as a first-class citizen.Java
server-side, client-side Android
, and big data scenarios.Kotlin
https://alibaba.github.io/fastjson2/kotlin_cnJSON Schema
https://alibaba.github.io/fastjson2/json_schema_cnAndroid 8+
Graal Native-Image
JSON Schema
https://alibaba.github.io/fastjson2/json_schema_cn<dependencies>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.23</version>
</dependency>
</dependencies>
Note: Fastjson2 serialization is only supported in Dubbo > 3.1.0. In Dubbo > 3.2.0, it will replace Hessian as the default serialization method.
# application.yml (Spring Boot)
dubbo:
protocol:
serialization: fastjson2
or
# dubbo.properties
dubbo.protocol.serialization=fastjson2
# or
dubbo.consumer.serialization=fastjson2
# or
dubbo.reference.com.demo.DemoService.serialization=fastjson2
or
<dubbo:protocol serialization="fastjson2" />
<!-- or -->
<dubbo:consumer serialization="fastjson2" />
<!-- or -->
<dubbo:reference interface="xxx" serialization="fastjson2" />