doubledutch/LazyJSON

Some strings containing invalid JSON raises a NullPointerException

Opened this issue · 1 comments

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)

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