jshn.sh: Add pretty-printing to json_dump
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 14 Apr 2023 18:37:05 +0000 (12:37 -0600)
committerAlexander Couzens <lynxis@fe80.eu>
Sat, 15 Apr 2023 13:04:19 +0000 (15:04 +0200)
commit6fc29d1c429240a9afb71c22aa161b066502f3ed
tree3f1fb3ad1c43b18070ea56131106f3144015248f
parentef5e8e38bd38f26e2da2f6f0a2d720468c935280
jshn.sh: Add pretty-printing to json_dump

If a JSON file might be read by a human, say for debugging, it
could be useful to pretty-print it.  We do this in places by
calling "json_dump -i" but it shouldn't be necessary to know the
arguments to "jshn" (and indeed, that's not portable if we retool
the underlying implementation). Conversely output that's ephemeral
doesn't need to be pretty (say being piped as input to another
command).

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
sh/jshn.sh