Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed May 21, 2022
1 parent ab8941a commit 74e1f4f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- 支持全量解析和部分解析。
- 支持`Java`服务端、客户端`Android`、大数据场景。
- 支持`Kotlin`
- 支持 `JSON Schema` https://github.com/alibaba/fastjson2/wiki/json_schema_cn
- 支持 `JSON Schema` [https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
- 支持`Android` [(2.0.4.android)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)
- 支持`Graal Native-Image` [(2.0.4.graal)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)

Expand All @@ -30,9 +30,9 @@
相关文档:

- `JSONB`格式文档:
https://github.com/alibaba/fastjson2/wiki/jsonb_format_cn
[https://alibaba.github.io/fastjson2/jsonb_format_cn](https://alibaba.github.io/fastjson2/jsonb_format_cn)
- `FASTJSON v2`性能有了很大提升,具体性能数据看这里:
https://github.com/alibaba/fastjson2/wiki/fastjson_benchmark
[https://alibaba.github.io/fastjson2/benchmark_cn](https://alibaba.github.io/fastjson2/benchmark_cn)

# 1. 使用准备

Expand Down
6 changes: 3 additions & 3 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
- Supports Kotlin
- Supports Android [(2.0.4.android)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)
- Supports `Graal Native-Image` [(2.0.4.graal)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)
- Supports `JSON Schema` https://github.com/alibaba/fastjson2/wiki/json_schema_cn
- Supports `JSON Schema` [https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)

![fastjson](docs/logo.jpg "fastjson")

Related Documents:

- `JSONB` format documentation:
https://github.com/alibaba/fastjson2/wiki/jsonb_format_cn
[https://alibaba.github.io/fastjson2/jsonb_format_cn](https://alibaba.github.io/fastjson2/jsonb_format_cn)
- `FASTJSON v2`'s performance has been significantly improved. For the benchmark, see here:
https://github.com/alibaba/fastjson2/wiki/fastjson_benchmark
[https://alibaba.github.io/fastjson2/benchmark_cn](https://alibaba.github.io/fastjson2/benchmark_cn)

# 1. Prepare

Expand Down
4 changes: 2 additions & 2 deletions docs/fastjson2_annotations_cn.md → docs/annotations_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static class VO {
```

### 1.5 配置序列化Features
可以通过JSONField.serializeFeatures来指定序列化的Feature。更多配置Features参考 https://github.com/alibaba/fastjson2/wiki/Features_cn
可以通过JSONField.serializeFeatures来指定序列化的Feature。更多配置Features参考 [https://alibaba.github.io/fastjson2/features_cn](https://alibaba.github.io/fastjson2/features_cn)
```java
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONWriter.Feature;
Expand Down Expand Up @@ -113,4 +113,4 @@ public static class Bean {

# 3. 基于mixin机制注入Annotation
当你需要定制化序列化一些LIB里面的类,你无法修改这些类的代码,你可以使用FASTJSON2的Minxin功能注入Annotation。
具体使用介绍参考这里: https://github.com/alibaba/fastjson2/wiki/mixin_cn
具体使用介绍参考这里: [https://alibaba.github.io/fastjson2/mixin_cn](https://alibaba.github.io/fastjson2/mixin_cn)
File renamed without changes.
20 changes: 10 additions & 10 deletions docs/fastjson_1_upgrade_cn.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# FASTJSON 1.x升级指南

## 1. 为什么要升级
* 性能更好,具体性能数据 https://github.com/alibaba/fastjson2/wiki/fastjson_benchmark
* 性能更好,具体性能数据 [https://alibaba.github.io/fastjson2/benchmark_cn](https://alibaba.github.io/fastjson2/benchmark_cn)
* 支持JDK新特性,包括JDK 14引入的Record,Lambda表达式的更原生支持,GraalVM Native-Image支持
* 原生支持kotlin
* 支持 JSON Schema https://alibaba.github.io/fastjson2/json_schema_cn
* 支持 JSON Schema [https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
* 统一文本和二进制API,在RPC、Redis场景也可以使用FASTJSON v2
* 更安全,完全删除autoType白名单,提升安全性 https://alibaba.github.io/fastjson2/fastjson2_autotype_cn
* 更安全,完全删除autoType白名单,提升安全性 [https://alibaba.github.io/fastjson2/autotype_cn](https://alibaba.github.io/fastjson2/autotype_cn)
* 新版本会长期维护,目标为下一个时间提供高性能JSON库,提需求能更快得到响应,提BUG也更快修复

## 2. 如何升级

### 2.1. 如何获得最新版本
FASTJSON v2项目目前处于活跃状态,会不定期发布新版本,你可以在fastjson2发布地址中获得最新版本 https://github.com/alibaba/fastjson2/releases
FASTJSON v2项目目前处于活跃状态,会不定期发布新版本,你可以在fastjson2发布地址中获得最新版本 [https://github.com/alibaba/fastjson2/releases](https://github.com/alibaba/fastjson2/releases)


可以两种模式升级:
* 兼容模式
* 使用fastjson v2新的API

### 2.2. 兼容模式升级
升级可以通过兼容模式升级,兼容模式不需要改代码,但在深度使用的场景,不能做到完全兼容,通过这样的模式升级虽然省事,请认证测试,遇到问题反馈到 https://github.com/alibaba/fastjson2/issues
升级可以通过兼容模式升级,兼容模式不需要改代码,但在深度使用的场景,不能做到完全兼容,通过这样的模式升级虽然省事,请认证测试,遇到问题反馈到 [https://github.com/alibaba/fastjson2/issues](https://github.com/alibaba/fastjson2/issues)

* 兼容模式Maven依赖
```xml
Expand Down Expand Up @@ -80,9 +80,9 @@ JSONFactory.getDefaultObjectReaderProvider().addAutoTypeAccept("com.mycompany.xx

## 4.2. ObjectSerializer 和 ObjectDeserializer 被移除了,有什么新的代替方案
FASTJSON v2中有比较完善的扩展机制,如下:
* Annotation介绍 https://github.com/alibaba/fastjson2/wiki/fastjson2_annotations
* Annotation注入介绍 https://github.com/alibaba/fastjson2/wiki/mixin_cn
* Feature介绍 https://github.com/alibaba/fastjson2/wiki/Features_cn
* 使用Mixin注入Anntation定制序列化和反序列化 https://github.com/alibaba/fastjson2/wiki/mixin_cn
* 实现ObjectWriter和ObjectReader实现定制序列化和反序列化 https://github.com/alibaba/fastjson2/wiki/register_custom_reader_writer_cn
* Annotation介绍 [https://alibaba.github.io/fastjson2/annotations_cn](https://alibaba.github.io/fastjson2/annotations_cn)
* Annotation注入介绍 [https://alibaba.github.io/fastjson2/mixin_cn](https://alibaba.github.io/fastjson2/mixin_cn)
* Feature介绍 [https://alibaba.github.io/fastjson2/features_cn](https://alibaba.github.io/fastjson2/features_cn)
* 使用Mixin注入Anntation定制序列化和反序列化 [https://alibaba.github.io/fastjson2/mixin_cn](https://alibaba.github.io/fastjson2/mixin_cn)
* 实现ObjectWriter和ObjectReader实现定制序列化和反序列化 [https://alibaba.github.io/fastjson2/register_custom_reader_writer_cn](https://alibaba.github.io/fastjson2/register_custom_reader_writer_cn)

File renamed without changes.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- 支持全量解析和部分解析。
- 支持`Java`服务端、客户端`Android`、大数据场景。
- 支持`Kotlin`
- 支持 [[`JSON Schema`|json_schema_cn] [https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
- 支持`JSON Schema` [https://alibaba.github.io/fastjson2/json_schema_cn](https://alibaba.github.io/fastjson2/json_schema_cn)
- 支持`Android` [(2.0.4.android)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)
- 支持`Graal Native-Image` [(2.0.4.graal)](https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/2.0.4.graal/)

Expand All @@ -15,9 +15,9 @@
相关文档:

- `JSONB`格式文档:
https://alibaba.github.io/fastjson2/jsonb_format_cn
[https://alibaba.github.io/fastjson2/jsonb_format_cn](https://alibaba.github.io/fastjson2/jsonb_format_cn)
- `FASTJSON v2`性能有了很大提升,具体性能数据看这里:
https://alibaba.github.io/fastjson2/fastjson_benchmark_cn
[https://alibaba.github.io/fastjson2/benchmark_cn](https://alibaba.github.io/fastjson2/benchmark_cn)

# 1. 使用准备

Expand Down

0 comments on commit 74e1f4f

Please sign in to comment.