added JSON output using the --json option