alibaba / alibaba/fastjson2

[QUESTION] 关于fastjson1兼容版使用文档的优化建议

Open Beginner friendly
#7,688 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

### 请描述您的问题
*询问有关本项目的使用和其他方面的相关问题。*

https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn
这里应该增加fastjson1没有的新特性的描述,底层使用的fastjson2,很多用户并不清楚fastjson2增加的新特性,因此用起来会不一致.

比如

com.alibaba.fastjson.JSON.toJSONString(bigObject) 可能会被拦截 报Maximum array size exceeded. Try enabling LargeObject feature instead. Requested size: 67108885, max size: 67108864, 是fastjson2的新特性拦截大对象. fastjson1没有这个拦截

且通过fastjson1定义的接口和特性无法兼容

必须直接使用

com.alibaba.fastjson2.JSON.toJSONString(bigObject, com.alibaba.fastjson2.JSONWriter.Feature.LargeObject)

Contributor guide

Open the contributing guide

Research direction

Open the linked fastjson_1_upgrade_cn wiki page and review its compatibility guidance alongside the described LargeObject example. Add a clear description of fastjson2-only behavior and the required fastjson2 API usage, then verify that the page explains how this differs from fastjson1.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.