Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: JSON stringify 第三个参数传入2时, 会添加\n和空格,导致包体积超大 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sheweifan
Copy link

同一个json文件,如果JSON.stringify第三个参数传入2的还,会插入空格和\n,导致包体积过大从而/api/open/import_data接口返回413

以下是不同参数打印出来的length,不传入2体积仅有40%
JSON.stringify(content, null, 2).length 1857523
JSON.stringify(content).length 739521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant