diff --git a/Yesod/Json.hs b/Yesod/Json.hs
--- a/Yesod/Json.hs
+++ b/Yesod/Json.hs
@@ -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').
diff --git a/yesod-json.cabal b/yesod-json.cabal
--- a/yesod-json.cabal
+++ b/yesod-json.cabal
@@ -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
 
