Added 'json' export feature for easier parsing

Great script! Added the ability to export data as JSON via '--json'.