tphummel/get-json — pull request #2 by dstokes (2014-01-30 00:54:38+00:00)
Title: return resp body when json.parse fails

Debugging bad requests w/ get-json is hard b/c you don't have access to the original response when the internal `JSON.parse` fails. One way to solve this is by returning the original response body as the second argument to the callback while setting the error the the thrown parse error. That way you can:
```javascript
getJson(url, function(err, resp) {
if (err) throw new Error('Failed to parse:'+ resp);
...
```
What do you think?