Read and write GraphSON format in JavaScript using Streams