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