{"action":"created","issue":{"url":"https://api.github.com/repos/labstack/echo/issues/247","labels_url":"https://api.github.com/repos/labstack/echo/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/labstack/echo/issues/247/comments","events_url":"https://api.github.com/repos/labstack/echo/issues/247/events","html_url":"https://github.com/labstack/echo/issues/247","id":114329789,"number":247,"title":"JSON Decoder in Echo context","user":{"login":"Puffton","id":12534742,"avatar_url":"https://avatars.githubusercontent.com/u/12534742?v=3","gravatar_id":"","url":"https://api.github.com/users/Puffton","html_url":"https://github.com/Puffton","followers_url":"https://api.github.com/users/Puffton/followers","following_url":"https://api.github.com/users/Puffton/following{/other_user}","gists_url":"https://api.github.com/users/Puffton/gists{/gist_id}","starred_url":"https://api.github.com/users/Puffton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Puffton/subscriptions","organizations_url":"https://api.github.com/users/Puffton/orgs","repos_url":"https://api.github.com/users/Puffton/repos","events_url":"https://api.github.com/users/Puffton/events{/privacy}","received_events_url":"https://api.github.com/users/Puffton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-30T18:38:44Z","updated_at":"2015-10-30T19:28:24Z","closed_at":null,"body":"In migrating from httprouter I have gotten rid of most helpers (yay!), but I still have this one left:\r\n\r\n```go\r\nfunc (a HelperController) DecodeJSON(b io.Reader, m interface{}) error {\r\n  return json.NewDecoder(b).Decode(m)\r\n}\r\n```\r\n\r\nIt may seem superfluous, but there are at least two ways of decoding JSON in the Go standard library, and I ended up using both by accident. Then I read up on it: I think the one I'm using (above) is the most performant in f.eg. JSON API's.\r\n\r\nI'm thinking of adding it to the Echo context, it would be nice to be able to call it like:\r\n```go\r\nerr := c.RequestJSON(&m)\r\n```\r\n\r\nThis is how I currently call it:\r\n```go\r\nerr := a.h.DecodeJSON(c.Request().Body, &m)\r\n```"},"comment":{"url":"https://api.github.com/repos/labstack/echo/issues/comments/152625540","html_url":"https://github.com/labstack/echo/issues/247#issuecomment-152625540","issue_url":"https://api.github.com/repos/labstack/echo/issues/247","id":152625540,"user":{"login":"Puffton","id":12534742,"avatar_url":"https://avatars.githubusercontent.com/u/12534742?v=3","gravatar_id":"","url":"https://api.github.com/users/Puffton","html_url":"https://github.com/Puffton","followers_url":"https://api.github.com/users/Puffton/followers","following_url":"https://api.github.com/users/Puffton/following{/other_user}","gists_url":"https://api.github.com/users/Puffton/gists{/gist_id}","starred_url":"https://api.github.com/users/Puffton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Puffton/subscriptions","organizations_url":"https://api.github.com/users/Puffton/orgs","repos_url":"https://api.github.com/users/Puffton/repos","events_url":"https://api.github.com/users/Puffton/events{/privacy}","received_events_url":"https://api.github.com/users/Puffton/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T19:28:24Z","updated_at":"2015-10-30T19:28:24Z","body":"Oh damn, how could I miss that... This framework is pretty damn neat!"}}