Generator class
node as the root of the JSON data stream to be serialized by the
Generator.
generator and returns it as a buffer.
filename, overwriting the current file
contents. This operation is atomic.
stream.
