| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 06:47:24 GMT
X-Served-By: cache-dfw-kdfw8210123-DFW, cache-bom-vanm7210062-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768632444.478144,VS0,VE293
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
hastache-aeson: render hastache templates using aeson values
[Skip to Readme]
hastache-aeson: render hastache templates using aeson values
The Module lets you render Hastache templates from aeson values. See the GitHub page for examples.
[Skip to Readme]
Downloads
- hastache-aeson-0.1.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0 |
|---|---|
| Dependencies | aeson (>=0.7.0.4), base (>=4.6 && <5), bytestring (>=0.10), containers (>=0.5), hastache (>=0.5), scientific (>=0.2), text (>=0.11), unordered-containers (>=0.2), vector (>=0.10) [details] |
| License | BSD-3-Clause |
| Copyright | Vladimir Kirillov |
| Author | Vladimir Kirillov <proger@hackndev.com> |
| Maintainer | Vladimir Kirillov <proger@hackndev.com> |
| Uploaded | by VladimirKirillov at 2015-09-11T10:34:43Z |
| Category | Text |
| Home page | https://github.com/proger/hastache-aeson |
| Bug tracker | https://github.com/proger/hastache-aeson/issues |
| Source repo | head: git clone git://github.com/proger/hastache-aeson.git |
| Distributions | |
| Reverse Dependencies | 2 direct, 0 indirect [details] |
| Downloads | 1773 total (10 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2015-09-11 [all 1 reports] |
Readme for hastache-aeson-0.1.1.0
[back to package description]hastache-aeson
- Lets you pass aeson
ValueasMuContextto hastache - Since yaml is API-compatible to
aeson, you can also renderyamlValues.
Example
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as LBS
import Control.Monad
import Data.Maybe (fromJust)
import Data.Yaml
import Text.Hastache
import Text.Hastache.Aeson (jsonValueContext)
event = BS.readFile "event.yaml"
template = BS.readFile "index.mustache"
render template value = hastacheStr defaultConfig template (jsonValueContext value)
main = do
value <- liftM (fromJust . decode) event :: IO Value
template' <- template
render template' value >>= LBS.putStrLn
Contributors
- Viktar Basharymau
- Vladimir Kirillov