Closed GoogleCodeExporter closed 9 years ago
An empty string isn't a valid JSON document. Two options:
- just catch the exception.
- begin your document with a beginArray() call (unconditionally) and end it
with an endArray() call. That'll guarantee your document is never invalid, even
if your array is empty.
Original comment by limpbizkit
on 11 Apr 2012 at 8:48
THIS IS NOT JSONDOCUMENT BUT A JSONWRITER
If the logic is creation of "Writer" then we may not write anything and we
close "The Writer" so there are no document
Making a writer then force it to create document immediately is wrong logic in
the first place. Think about OOP then "Writer" and "Document" is difference
object. Creation and Closing "Writer" should not always strongly relate to
"Document"
Original comment by thainayu
on 12 Apr 2012 at 6:37
Original issue reported on code.google.com by
thainayu
on 19 Mar 2012 at 7:55