There is no such thing as newline-delimited JSON. What you ask is storing JSON objects in single, separate lines. This is used by many big data and event processing products, including Azure Stream Analytics, Hive, Google's Big Query etc.
This method of storage is used because it makes parallel processing a lot easier:
- When reading, a single file can be partitioned easily by line without actually parsing the entire text, and assigned to different threads or workers.
- Lines can be processed independently, without waiting for the entire text to be parsed. This allows you to take advantage eg of asynchronous operations and/or Dataflow to read and parse concurrently
- When writing, multiple threads can write the data to different files, then all the files can be merged in a single one. Even when you write to a single disk, OS and disk buffering and operation overhead means that sendind X operations concurrently can finish faster than executing X operations sequentially.
- Each worker/thread can write a new record directly. A parser would need access to all records to generate the file.
For this reason, it is not a good idea to use a parser to generate such files, even if the parser supported it. A single-threaded implementation would simply be too slow, and would force you to collect all records before writing them out.
To improve performance, you could write to multiple files, preferably on separate disks and combine all files into one at the end. You could also write each record as it is generated, instead of waiting to load all of them into memory before writing them out.