diff options
Diffstat (limited to 'src/server/Json.hs')
-rw-r--r-- | src/server/Json.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/Json.hs b/src/server/Json.hs new file mode 100644 index 0000000..51287ed --- /dev/null +++ b/src/server/Json.hs @@ -0,0 +1,12 @@ +module Json + ( jsonObject + ) where + +import Web.Scotty (json, ActionM) + +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 |