Closed GoogleCodeExporter closed 8 years ago
According to http://www.ietf.org/rfc/rfc4627.txt
2.
"A JSON text is a serialized object or array."
null is not a valid JSON text.
But you may change your own code to suit your need.
Original comment by milo...@gmail.com
on 18 Jun 2013 at 1:34
It would appear that the goal of PrettyWriter is to produce valid JSON text.
It would appear that the goal of Document is to represent valid JSON text as a
DOM-like object.
However, a default-constructed Document is NOT a representation of valid JSON
text. This is a surprising characteristic.
Perhaps some documentation could be added somewhere indicating that this
dissonance is intentional.
Original comment by Matthew....@gmail.com
on 18 Jun 2013 at 2:21
The document may not state clearly that a default constructed document is in
invalid state (null).
Currently it would need to explicitly call SetArray() or SetObject() for
Docuemnt to be a valid document.
I will consider to change this default behavior.
Original comment by milo...@gmail.com
on 18 Jun 2013 at 2:29
Original comment by milo...@gmail.com
on 18 Jun 2013 at 2:29
Fixed in https://github.com/miloyip/rapidjson/pull/101
Original comment by milo...@gmail.com
on 11 Aug 2014 at 4:30
Original issue reported on code.google.com by
Matthew....@gmail.com
on 17 Jun 2013 at 10:28