diff --git a/Yesod/Json.hs b/Yesod/Json.hs
--- a/Yesod/Json.hs
+++ b/Yesod/Json.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE CPP #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 module Yesod.Json
     ( -- * Convert from a JSON value
@@ -23,7 +24,11 @@
 import Data.Aeson.Encode (fromValue)
 import Data.Text (pack)
 import Control.Arrow (first)
+#if MIN_VERSION_aeson(0, 4, 0)
+import Data.HashMap.Strict (fromList)
+#else
 import Data.Map (fromList)
+#endif
 import qualified Data.Vector as V
 import Text.Julius (ToJavascript (..))
 import Data.Text.Lazy.Builder (fromLazyText)
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
+version:         0.2.2.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
@@ -20,6 +20,7 @@
                    , shakespeare-js       >= 0.10     && < 0.11
                    , vector               >= 0.9
                    , containers           >= 0.2      && < 0.5
+                   , unordered-containers
     exposed-modules: Yesod.Json
     ghc-options:     -Wall
 
