Add format option to support json output

@gseguin not sure if you think this is valuable but added an option to output JSON format.