Add option to output data as JSON