Writes the document as JSON (SPEC.md §5) with memory independent of its size. Doesn't close out.
Writes the document as JSON laid out in format (SPEC.md §5.1) with memory independent of its size. Doesn't close out.