JSON Lines support Lassi Kortela (21 Jan 2020 12:05 UTC)
Re: JSON Lines support Amirouche Boubekki (21 Jan 2020 15:00 UTC)
Re: JSON Lines support Lassi Kortela (21 Jan 2020 22:47 UTC)
Re: JSON Lines support John Cowan (21 Jan 2020 22:51 UTC)
Re: JSON Lines support Lassi Kortela (21 Jan 2020 23:07 UTC)
Re: JSON Lines support John Cowan (22 Jan 2020 00:11 UTC)
Pretty-printing JSON Lassi Kortela (22 Jan 2020 00:22 UTC)
Re: Pretty-printing JSON John Cowan (22 Jan 2020 02:28 UTC)
Different kinds of JSON writers, and naming them Lassi Kortela (22 Jan 2020 11:52 UTC)
Re: Different kinds of JSON writers, and naming them John Cowan (22 Jan 2020 18:37 UTC)
Re: Different kinds of JSON writers, and naming them Lassi Kortela (22 Jan 2020 22:33 UTC)
Re: Different kinds of JSON writers, and naming them John Cowan (22 Jan 2020 22:44 UTC)
Re: Different kinds of JSON writers, and naming them Duy Nguyen (23 Jan 2020 10:01 UTC)
Optional features in SRFIs Lassi Kortela (24 Jan 2020 15:30 UTC)
Re: Optional features in SRFIs Lassi Kortela (24 Jan 2020 15:35 UTC)
Re: Optional features in SRFIs Arthur A. Gleckler (24 Jan 2020 15:57 UTC)
Re: Optional features in SRFIs John Cowan (24 Jan 2020 17:01 UTC)
Re: Optional features in SRFIs Lassi Kortela (24 Jan 2020 17:07 UTC)
(missing)
Re: Optional features in SRFIs Lassi Kortela (24 Jan 2020 18:43 UTC)
Re: Optional features in SRFIs Lassi Kortela (24 Jan 2020 17:12 UTC)

Pretty-printing JSON Lassi Kortela 22 Jan 2020 00:21 UTC

> By outboard I mean using an external tool like "jq .", which
> prettyprints its output after doing a null transformation on it.

I also use "jq ." all the time, but keep wishing the original JSON was
indented so I didn't have to do that :) Almost none of the JSON dumps
are big enough that pretty-printing would cause a performance problem.

> This would have to be an option to write-json, to prettyprint or not. I
> hate options.  :-)

Several Schemes have a `pretty-print` or `pp` procedure for
S-expressions. There could be a JSON equivalent `json-pretty-print`, for
example.

As Alan Perlis, Rich Hickey and many others have noted, having more
procedures does not make the system more complex. It's only procedures
that have to interact with each other that add complexity. The pretty
printer can be separate from the writer (naturally the implementations
would share many internals).

But if `json-write` writes a condensed format like Scheme `write`, is it
much different from a `json-write-line` that would write a JSON Lines
compatible value? Would there in fact be any difference other than a
final newline?