A JSON writer that doesn't prettyprint by adding additional whitespace is automatically conforming to JSON Lines provided you call (newline port) afterwards.  Likewise, such a writer can be made to conform to JSON Sequence by calling (write-char #\x001E port) before and (newline port) after.

IMO prettyprinting should be done outboard anyway.  At the REPL you probably want to use the Scheme-level prettyprinter to see the internal representation.

On Tue, Jan 21, 2020 at 5:47 PM Lassi Kortela <xxxxxx@lassi.io> wrote:
>> (json-write-line obj [port])
> The code seems easy with the current implementation, but it might be
> better to provide a helper for that.

It's usually not hard to do by adapting a normal JSON writer, but that
causes worry about "am I sure that I used the right options?" :)