Added JSON data formatting
Added JSON output functionality.