Skip to content

Should be pass EMPTY DOCUMENT without throwing exception #421

@GoogleCodeExporter

Description

@GoogleCodeExporter
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 thainayu on 19 Mar 2012 at 7:55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions