Added support for JSON output