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

Some strings containing invalid JSON raises a NullPointerException #20

Open
tom-beck opened this issue Aug 19, 2019 · 1 comment
Open
Assignees

Comments

@tom-beck
Copy link

Calling new LazyObject("{\"key\":2]") will raise a LazyException.
Calling new LazyObject("{\"key\":2}\"") will raise a NullPointer exception.

It would be great if all parsing issues raised a LazyException.

The stacktrace:

java.lang.NullPointerException
	at me.doubledutch.lazyjson.LazyParser.tokenize(LazyParser.java:263)
	at me.doubledutch.lazyjson.LazyObject.<init>(LazyObject.java:23)
@kasperjj
Copy link
Contributor

Yeah, that absolutely should be raising a LazyException! Thanks for reporting this!

@kasperjj kasperjj self-assigned this Aug 22, 2019
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

No branches or pull requests

2 participants