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

FastJson 1.2.37 "unclosed.str" issue with valid input #1422

Closed
greenlaw110 opened this issue Aug 19, 2017 · 1 comment
Closed

FastJson 1.2.37 "unclosed.str" issue with valid input #1422

greenlaw110 opened this issue Aug 19, 2017 · 1 comment
Labels
Milestone

Comments

@greenlaw110
Copy link

Note the issue only captured on v1.2.37.

Given two strings below:

String strOk = "{\"v\": 111}";
String strBad = "{\"v\":111}";

Note the only difference is there is a whitespace behind : in strOk.

parsing strOk is fine:

Foo ok = JSON.parseObject(strOk, Foo.class);

This will cause the unclosed.str issue:

Foo bad = JSON.parseObject(strBad, Foo.class);

Screenshot:
image

The full code to reproduce the issue:

https://gist.github.com/greenlaw110/3d0fc68a569565bdf1c9056ef25ab1fb

@wenshao wenshao added the bug label Aug 20, 2017
@wenshao wenshao added this to the 1.2.38 milestone Aug 20, 2017
@wenshao
Copy link
Member

wenshao commented Sep 1, 2017

bug fixed, please try the last version. https://github.com/alibaba/fastjson/releases/tag/1.2.38

@wenshao wenshao closed this as completed Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants