[BUG]JSON api 文档与使用不一致
Open
bug
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
JSON api 文档与使用不一致。例如文档中是这么描述的:
2.4 将Java对象序列化为JSON
Java:
Object data = "...";
String text = JSON.toJSONString(data);//但是实际上外部访问不到这个toJSONString,因为他不是public的
byte[] text = JSON.toJSONBytes(data);
实际情况:
外部访问不到这个api。

### 环境信息
任何环境
### 重现步骤
在第三方场景下,使用JSON.toJSONString()
### 期待的正确结果
能够正常使用
### 相关日志输出
无
#### 附加信息
无
Contributor guide
Research direction
Start with the JSON API documentation section 2.4 and the JSON.toJSONString() entry point. Compare the documented accessibility with what a third-party caller can use, then verify the documented example against the actual public API and run an external-use check. Done means the example and API accessibility agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100