add 'formatting' option for prettier json

Pretty self-explanatory.

FYI, I tested whether newlines exist in generated resources file. If you have a suggestion for a different mechanism for testing prettiness, I'd be happy to impl another way.