alibaba / alibaba/fastjson2

后台返回出现JSON前边乱码请问怎么解决

Open
#2,219 5 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

### 请描述您的问题
*询问有关本项目的使用和其他方面的相关问题。*
![image](https://github.com/alibaba/fastjson2/assets/19164578/50fc1d0c-d00a-46dd-ab05-67c6f8c828e8)

使用fastJson1.2.83的时候返回的json是正常的,用fastJson2.0.45就出现乱码请问怎处理

Contributor guide

Open the contributing guide

Research direction

Start with the reported response path and compare the behavior of fastjson 1.2.83 and 2.0.45 using the example shown in the issue image. Identify whether the leading garbage is produced during JSON serialization or by response encoding, then document a reproducible case and verify that the response contains valid JSON without the extra characters.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.