blob: 935a9cbff7ea8d640a7a4a29c5e14bc6e752205c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{-# LANGUAGE OverloadedStrings #-}
module Json
( jsonObject
) where
import Web.Scotty
import Network.HTTP.Types.Status (badRequest400)
import qualified Data.Aeson.Types as Json
import qualified Data.HashMap.Strict as M
import Data.Text (Text)
jsonObject :: [(Text, Json.Value)] -> ActionM ()
jsonObject = json . Json.Object . M.fromList
|