Small function to load a configuration from a JSON file and return a pointer to a struct. I use it so often I might as well just make a quick importable package so I don't have to keep copy/pasting it. Maybe I'll make it a fully fledged thing someday.
Save accepts a configuration interface type and writes it to a file
in json format.
Caller can specify whether or not to write the json "pretty" printed
using indentation by specifying true or false to the pretty parameter.