from this code
http://code.google.com/p/google-gson/source/browse/trunk/gson/src/main/java/com/
google/gson/stream/JsonWriter.java?r=615#416
It only check for document to end properly, but sometime we just open
JSonWriter but later logic don't write anything so we just want to close then
it will throw exception
Which I think is no need, it should be check or if peek() !=
JsonScope.EMPTY_DOCUMENT too, or changing JsonScope to drop EMPTY and NONEMPTY,
just check that scope stack is empty and that's all
Original issue reported on code.google.com by
thainayuon 19 Mar 2012 at 7:55