martini-contrib/encoder — pull request #10 by manucorporat (2014-05-16 02:13:53+00:00)
Title: Adds Render(), JSON() and XML() facilities.

Adds Encoder.Render() facility. Since encoder.Must is very frequently used:

`enc.Render(result)` == `encoder.Must(enc.Encode(result))`

and now you can use:

```
m.Use(encoder.JSON())
```

instead of:

```
m.Use(func(c martini.Context, w http.ResponseWriter) {
c.MapTo(encoder.JsonEncoder{}, (*encoder.Encoder)(nil))
w.Header().Set("Content-Type", "application/json; charset=utf-8")
})
```