yesod-json 0.2.2.1 → 0.2.2.2
raw patch · 2 files changed
+13/−1 lines, 2 filesdep +blaze-builderPVP ok
version bump matches the API change (PVP)
Dependencies added: blaze-builder
API changes (from Hackage documentation)
Files
- Yesod/Json.hs +11/−0
- yesod-json.cabal +2/−1
Yesod/Json.hs view
@@ -33,9 +33,20 @@ import Text.Julius (ToJavascript (..)) import Data.Text.Lazy.Builder (fromLazyText) import Data.Text.Lazy.Encoding (decodeUtf8)+#if MIN_VERSION_aeson(0, 5, 0)+import Data.Text.Lazy.Builder (toLazyText)+import qualified Blaze.ByteString.Builder.Char.Utf8 as Blaze+#endif instance ToContent J.Value where+#if MIN_VERSION_aeson(0, 5, 0)+ toContent = flip ContentBuilder Nothing+ . Blaze.fromLazyText+ . toLazyText+ . fromValue+#else toContent = flip ContentBuilder Nothing . fromValue+#endif -- | Provide both an HTML and JSON representation for a piece of data, using -- the default layout for the HTML output ('defaultLayout').
yesod-json.cabal view
@@ -1,5 +1,5 @@ name: yesod-json-version: 0.2.2.1+version: 0.2.2.2 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -21,6 +21,7 @@ , vector >= 0.9 , containers >= 0.2 && < 0.5 , unordered-containers+ , blaze-builder exposed-modules: Yesod.Json ghc-options: -Wall