Writing all JSON, including delimiters in a single operation.

Fixes #189