3 ms·
I'd like to see something like this, but with JSON-based APIs instead of HTML templating.
by 15155 11y ago
I'd like to see something like this, but with JSON-based APIs instead of HTML templating.
- danidiaz 11y ago"aeson" is the go-to library for producing and parsing JSON in Haskell.
- codygman 11y agoYou'd like servant: http://haskell-servant.github.io/tutorial/#tutorial http://haskell-servant.github.io/tutorial/#tutorial
- framp 11y agoYou should check out PostgREST, a tool to expose Postres tables through a JSON APIs: https://github.com/begriffs/postgrest https://github.com/begriffs/postgrest
- akurilin 11y agothoughtbot's carnival is a good example of a JSON API written with Yesod: https://github.com/thoughtbot/carnival https://github.com/thoughtbot/carnival
- serras 11y ago(Author here) There is a set of exercises that come with the slides at https://github.com/serras/lambdaconf-2015-web https://github.com/serras/lambdaconf-2015-web In particular, they introduce the Aeson library for both producing and consuming JSON.
- dllthomas 11y agoI believe the HTML templating stuff is pretty optional in all the major Haskell web platforms. I know in Yesod it is trivial to serve JSON rather than HTML from an end-point, and pretty easy to serve multiple representations of the same resource.