{"action":"closed","issue":{"url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/930","repository_url":"https://api.github.com/repos/BurntSushi/ripgrep","labels_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/930/labels{/name}","comments_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/930/comments","events_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/930/events","html_url":"https://github.com/BurntSushi/ripgrep/issues/930","id":327061616,"number":930,"title":"Add json output format","user":{"login":"garygreen","id":1702638,"avatar_url":"https://avatars2.githubusercontent.com/u/1702638?v=4","gravatar_id":"","url":"https://api.github.com/users/garygreen","html_url":"https://github.com/garygreen","followers_url":"https://api.github.com/users/garygreen/followers","following_url":"https://api.github.com/users/garygreen/following{/other_user}","gists_url":"https://api.github.com/users/garygreen/gists{/gist_id}","starred_url":"https://api.github.com/users/garygreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garygreen/subscriptions","organizations_url":"https://api.github.com/users/garygreen/orgs","repos_url":"https://api.github.com/users/garygreen/repos","events_url":"https://api.github.com/users/garygreen/events{/privacy}","received_events_url":"https://api.github.com/users/garygreen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-28T15:28:49Z","updated_at":"2018-05-28T15:43:26Z","closed_at":"2018-05-28T15:43:25Z","author_association":"NONE","body":"It would be awesome if ripgrep could output the search results in JSON format, something like:\r\n\r\n```json\r\n{\r\n    \"search_query\": \"ipaddress\",\r\n    \"results\": [\r\n        {\r\n            \"file\": \"E:\\\\Sites\\\\cc-new\\\\app\\\\Member\\\\BannedMember.php\",\r\n            \"line\": 34,\r\n            \"content\": \"'ipaddress' => Request::getClientIp(),\",\r\n            \"ranges\": [\r\n                [1, 9]\r\n            ]\r\n        },\r\n        {\r\n            \"file\": \"E:\\\\Sites\\\\cc-new\\\\app\\\\Http\\\\Controllers\\\\Admin\\\\MemberController.php\",\r\n            \"line\": 177,\r\n            \"content\": \"$create_data['ipaddress'] = $request->get('ipaddress');\",\r\n            \"ranges\": [\r\n                [14, 24],\r\n                [44, 53]\r\n            ]\r\n        },\r\n    ],\r\n    \"stats\": {\r\n        \"total_matches\": 2,\r\n        \"files_searched\": 102\r\n    }\r\n}\r\n```\r\n\r\nThis would mean you can create custom looking interfaces by consuming the search results much easier."}}
{"actor":{"display_login":"BurntSushi"}}