diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## 0.4.1.2 - 2022-03-09
+
+### Added
+
+ - Haskell `aeson` 2.0 support
+
 ## 0.4.1.1 - 2022-03-07
 
 ### Fixed
diff --git a/hercules-ci-api-agent.cabal b/hercules-ci-api-agent.cabal
--- a/hercules-ci-api-agent.cabal
+++ b/hercules-ci-api-agent.cabal
@@ -1,7 +1,7 @@
 cabal-version: 1.12
 
 name:           hercules-ci-api-agent
-version:        0.4.1.1
+version:        0.4.1.2
 synopsis:       API definition for Hercules CI Agent to talk to hercules-ci.com or Hercules CI Enterprise
 category:       API, CI, Testing, DevOps, Nix
 homepage:       https://github.com/hercules-ci/hercules-ci-agent#readme
diff --git a/test/Hercules/API/Agent/LifeCycle/AgentInfoSpec.hs b/test/Hercules/API/Agent/LifeCycle/AgentInfoSpec.hs
--- a/test/Hercules/API/Agent/LifeCycle/AgentInfoSpec.hs
+++ b/test/Hercules/API/Agent/LifeCycle/AgentInfoSpec.hs
@@ -1,6 +1,6 @@
 module Hercules.API.Agent.LifeCycle.AgentInfoSpec where
 
-import Data.Aeson (eitherDecode, encode, (.=))
+import Data.Aeson (eitherDecode, encode)
 import qualified Data.Aeson as A
 import qualified Data.ByteString.Lazy as BL
 import qualified Data.Map as M
@@ -81,15 +81,18 @@
       concurrentTasks = 19,
       labels =
         M.fromList
-          [ "nix is cool" .= True,
-            "revision" .= ("deadbeef" :: Text),
+          [ "nix is cool" $= True,
+            "revision" $= ("deadbeef" :: Text),
             "an object"
-              .= A.object
-                [ "hi" .= (42 :: Int)
+              $= A.object
+                [ "hi" $= (42 :: Int)
                 ],
-            "drinks menu" .= ["goat milk", "mate", "matcha" :: Text]
+            "drinks menu" $= ["goat milk", "mate", "matcha" :: Text]
           ]
     }
+
+($=) :: A.ToJSON b => a -> b -> (a, A.Value)
+a $= b = (a, A.toJSON b)
 
 spec :: Spec
 spec = describe "AgentInfo" $ do
diff --git a/test/Hercules/Formats/SecretSpec.hs b/test/Hercules/Formats/SecretSpec.hs
--- a/test/Hercules/Formats/SecretSpec.hs
+++ b/test/Hercules/Formats/SecretSpec.hs
@@ -8,6 +8,7 @@
 import Control.Applicative
 import Data.Aeson (eitherDecode)
 import qualified Data.Aeson as A
+import qualified Data.Aeson.Key as AK
 import Data.Char
 import Data.Either (isLeft)
 import Data.Int
@@ -66,7 +67,7 @@
   frequency
     [ (2, A.String <$> text),
       (2, A.Array . V.fromList <$> vectorOf n (resize n' genValue)),
-      (5, A.object <$> vectorOf n ((A..=) <$> text <*> (resize n' genValue))),
+      (5, A.object <$> vectorOf n ((\s k -> AK.fromText s A..= k) <$> text <*> resize n' genValue)),
       (1, A.Number . fromIntegral <$> (arbitrary :: Gen Int64)), -- no fractions :( but doesn't matter here
       (1, A.Bool <$> arbitrary)
     ]
