We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
string s = "2a"; Object x = SimpleJson.DeserializeObject(s);
throw Invalid JSON string Exception
2
The text was updated successfully, but these errors were encountered:
good catch. can u send a PR with failing unit test and fix if possible.
Seems like var s1 = "{\"a\":2a}"; and var s2 = "[2a]"; throws the json exception but not var s = "2a";.
var s1 = "{\"a\":2a}";
var s2 = "[2a]";
var s = "2a";
The fix can be added to this line.
simple-json/src/SimpleJson/SimpleJson.cs
Line 548 in e2528f3
If the index is less then charArray.Length means we haven't completed parsing the json string and should set obj to null and return false.
index
charArray.Length
obj
Seems like var s = "\"a\"2"; also doesn't throw json exception.
var s = "\"a\"2";
Sorry, something went wrong.
No branches or pull requests
Reproduce code:
Expected result:
throw Invalid JSON string Exception
Actual result:
2
The text was updated successfully, but these errors were encountered: