Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lupino/jason
A fast JASONETTE-iOS JSON combinator library for haskell.
https://github.com/lupino/jason
Last synced: about 1 month ago
JSON representation
A fast JASONETTE-iOS JSON combinator library for haskell.
- Host: GitHub
- URL: https://github.com/lupino/jason
- Owner: Lupino
- License: bsd-3-clause
- Created: 2016-11-10T04:18:52.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-11T02:33:54.000Z (about 8 years ago)
- Last Synced: 2024-10-28T14:17:41.380Z (2 months ago)
- Language: Haskell
- Size: 27.3 KB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JASON
=====A fast JASONETTE-iOS JSON combinator library for haskell.
```haskell
{-# LANGUAGE OverloadedStrings #-}
module Main whereimport Data.Aeson (encode)
import qualified Data.ByteString.Lazy.Char8 as B
import Jason
import Prelude hiding (head)main :: IO ()
main = B.putStrLn . encode $ renderJason appapp :: Jason
app = jason $ do
head $ do
title "Hello World"
description "This app displays 'Hello World' on the screen"
styles $
"styled_row" .== do
font "HelveticaNeue"
size "20"
color "#ff0000"
padding "10"
data_ $
"names" .-- do
"Lupino"
"Lupino 2"
"Lupino 3"
body $
sections $
items $ do
vertical $
components $ do
label "This is row 1" $ class_ "styled_row"
label "This is row 2" $ class_ "styled_row"
label "This is row 3" $ class_ "styled_row"
horizontal $
components $ do
button "Button 1" $ class_ "styled_row"
button "Button 2" $ class_ "styled_row"
button "Button 3" $ do
class_ "styled_row"
action $ do
type_ "$util.banner"
options $ do
title "Hello"
description "World"
```Usage
-----Install:
```bash
stack install jason
```