Skip to content
New issue

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

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

Already on GitHub? # to your account

SyntaxError: Unexpected end of input #13

Open
caihuiji opened this issue Oct 21, 2015 · 1 comment
Open

SyntaxError: Unexpected end of input #13

caihuiji opened this issue Oct 21, 2015 · 1 comment
Labels

Comments

@caihuiji
Copy link
Member

当拉回来的数据为空,直接调用json.parse ,会报此错误
image

@loskael
Copy link
Member

loskael commented Mar 28, 2017

在最新版的 chrome 中, 错误信息已调整:

Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at <anonymous>:1:6

对于 JSON.parse JSON.stringify 这些操作, 建议都加上 try catch

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

No branches or pull requests

2 participants