LazyJSON icon indicating copy to clipboard operation
LazyJSON copied to clipboard

Some strings containing invalid JSON raises a NullPointerException

Open tom-beck opened this issue 4 years ago • 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)

tom-beck avatar Aug 19 '19 15:08 tom-beck

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

kasperjj avatar Aug 22 '19 20:08 kasperjj