%jsonmunge(1) user manual | version 1.3.5 f86e208 % R. S. Doiel % 2026-02-12
jsonmunge
jsonmunge [OPTIONS] TEMPLATE_FILENAME
jsonmunge is a command line tool that takes a JSON document and one or more Go templates rendering the results. Useful for reshaping a JSON document, transforming into a new format, or filter for specific content.
- TEMPLATE_FILENAME is the name of a Go text tempate file used to render the outbound JSON document
-help : display help
-license : display license
-version : display version
-E, -expression : use template expression as template
-i, -input : input filename
-nl, -newline : if true add a trailing newline
-o, -output : output filename
-quiet : suppress error messages
If person.json contained
{"name": "Doe, Jane", "email":"jd@example.org", "age": 42}and the template, name.tmpl, contained
{{- .name -}}Getting just the name could be done with
cat person.json | jsonmunge name.tmplThis would yield
"Doe, Jane"jsonmunge 1.3.5