Popularity
3.3
Declining
Activity
0.0
Stable
4
3
1
Monthly Downloads: 2
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
hastache-aeson alternatives and similar packages
Based on the "hastache" category.
Alternatively, view hastache-aeson alternatives based on common mentions on social networks and blogs.
Do you think we are missing an alternative of hastache-aeson or a related project?
Popular Comparisons
README
hastache-aeson
- Lets you pass aeson
Value
asMuContext
to hastache - Since yaml is API-compatible to
aeson
, you can also renderyaml
Value
s.
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