造了一个 JASONETTE JSON 渲染库,再也不用写蛋疼的 JSON 了
app :: Jason app = jason $ do head $ do title "Hello World" description "This app displays 'Hello World' on the screen" styles $ styleRow "styled_row" $ do font "HelveticaNeue" size"20" color "#ff0000" padding "10" 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"