Generates a JSON data stream from this and returns it as a buffer.
this |
a generator |
length |
return location for the length of the returned buffer |
a newly allocated string holding a JSON data stream |