add `-j` flag to output certs to json format

I was just playing around with your code, noticed the commented out json code, and wanted to try it out :)