Caltech Library logo

jsonmunge

USAGE

jsonmunge [OPTIONS] TEMPLATE_FILENAME

SYSNOPSIS

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.

OPTIONS

	-h	display help
	-i	input filename
	-input	input filename
	-l	display license
	-o	output filename
	-output	output filename
	-v	display version

EXAMPLES

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.tmpl

This would yeild

    "Doe, Jane"

jsonmunge v0.0.9