Removed unneeded conditional
This commit is contained in:
parent
ee01aaf268
commit
1b8a1b9d42
@ -1,5 +1,4 @@
|
|||||||
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-}
|
{-# LANGUAGE TypeSynonymInstances, OverloadedStrings #-}
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
module Yesod.Core.Json
|
module Yesod.Core.Json
|
||||||
( -- * Convert from a JSON value
|
( -- * Convert from a JSON value
|
||||||
@ -90,11 +89,6 @@ parseJsonBody_ = do
|
|||||||
J.Error s -> invalidArgs [pack s]
|
J.Error s -> invalidArgs [pack s]
|
||||||
J.Success a -> return a
|
J.Success a -> return a
|
||||||
|
|
||||||
#if !MIN_VERSION_shakespeare_js(1, 0, 2)
|
|
||||||
instance ToJavascript J.Value where
|
|
||||||
toJavascript = fromLazyText . decodeUtf8 . JE.encode
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-- | Convert a list of pairs to an 'J.Object'.
|
-- | Convert a list of pairs to an 'J.Object'.
|
||||||
object :: J.ToJSON a => [(Text, a)] -> J.Value
|
object :: J.ToJSON a => [(Text, a)] -> J.Value
|
||||||
object = J.object . map (second J.toJSON)
|
object = J.object . map (second J.toJSON)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user