diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## [0.2.0.1] - 2022-10-06
+
+### Added
+
+* The `HasObjectCodec` type class
+
 ## [0.2.0.0] - 2022-07-21
 
 ### Added
diff --git a/autodocodec.cabal b/autodocodec.cabal
--- a/autodocodec.cabal
+++ b/autodocodec.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           autodocodec
-version:        0.2.0.0
+version:        0.2.0.1
 synopsis:       Self-documenting encoder and decoder
 homepage:       https://github.com/NorfairKing/autodocodec#readme
 bug-reports:    https://github.com/NorfairKing/autodocodec/issues
diff --git a/src/Autodocodec.hs b/src/Autodocodec.hs
--- a/src/Autodocodec.hs
+++ b/src/Autodocodec.hs
@@ -19,6 +19,7 @@
     JSONCodec,
     JSONObjectCodec,
     HasCodec (..),
+    HasObjectCodec (..),
 
     -- * Writing a codec
     object,
diff --git a/src/Autodocodec/Aeson/Decode.hs b/src/Autodocodec/Aeson/Decode.hs
--- a/src/Autodocodec/Aeson/Decode.hs
+++ b/src/Autodocodec/Aeson/Decode.hs
@@ -112,7 +112,7 @@
       DiscriminatedUnionCodec propertyName _ m -> do
         discriminatorValue <- (value :: JSON.Object) JSON..: Compat.toKey propertyName
         case HashMap.lookup discriminatorValue m of
-          Nothing -> fail $ "Unexpected discriminator value: " <> T.unpack discriminatorValue
+          Nothing -> fail $ "Unexpected discriminator value: " <> show discriminatorValue
           Just (_, c) ->
             go value c
       CommentCodec _ c -> go value c
diff --git a/src/Autodocodec/Class.hs b/src/Autodocodec/Class.hs
--- a/src/Autodocodec/Class.hs
+++ b/src/Autodocodec/Class.hs
@@ -153,6 +153,16 @@
 instance HasCodec DiffTime where
   codec = dimapCodec realToFrac realToFrac (codec :: JSONCodec Scientific)
 
+-- | A class for values which have a canonical object codec.
+--
+-- There are no formal laws for this class.
+-- If you really want a law, it should be "Whomever uses the 'codec' from your instance should not be surprised."
+class HasObjectCodec object where
+  -- | A object codec for the value
+  --
+  -- See the sections on helper functions for implementing this for plenty of examples.
+  objectCodec :: JSONObjectCodec object
+
 -- | A required field
 --
 -- During decoding, the field must be in the object.
diff --git a/src/Autodocodec/Codec.hs b/src/Autodocodec/Codec.hs
--- a/src/Autodocodec/Codec.hs
+++ b/src/Autodocodec/Codec.hs
@@ -58,7 +58,7 @@
 --
 -- also called an "Autodocodec".
 --
--- In an ideal situation, this type would have only one type paramater: 'Codec value'.
+-- In an ideal situation, this type would have only one type parameter: 'Codec value'.
 -- This does not work very well because we want to be able to implement 'Functor' and 'Applicative', which each require a kind '* -> *'.
 -- So instead we use two type parameters.
 --
@@ -539,7 +539,7 @@
 --
 -- === 'HasCodec' instance for sum types with an encoding that is definitely disjoint.
 --
--- The 'eitherCodec' can be used to implement 'HasCodec' instances sum types
+-- The 'eitherCodec' can be used to implement 'HasCodec' instances for sum types
 -- for which the encoding is definitely disjoint.
 --
 -- >>> data War = WorldWar Word8 | OtherWar Text deriving (Show, Eq)
@@ -1497,7 +1497,7 @@
 --
 -- > disjointMatchChoiceCodec = matchChoicesCodecAs DisjointUnion
 matchChoicesCodec ::
-  -- | Codecs, each which their own rendering matcher
+  -- | Codecs, each with their own rendering matcher
   [(input -> Maybe input, Codec context input output)] ->
   -- | Fallback codec, in case none of the matchers in the list match
   Codec context input output ->
@@ -1513,7 +1513,7 @@
 --
 -- > disjointMatchChoiceCodec = matchChoicesCodecAs DisjointUnion
 disjointMatchChoicesCodec ::
-  -- | Codecs, each which their own rendering matcher
+  -- | Codecs, each with their own rendering matcher
   [(input -> Maybe input, Codec context input output)] ->
   -- | Fallback codec, in case none of the matchers in the list match
   Codec context input output ->
@@ -1523,7 +1523,7 @@
 -- | An even more general version of 'matchChoicesCodec' and 'disjointMatchChoicesCodec'
 matchChoicesCodecAs ::
   Union ->
-  -- | Codecs, each which their own rendering matcher
+  -- | Codecs, each with their own rendering matcher
   [(input -> Maybe input, Codec context input output)] ->
   -- | Fallback codec, in case none of the matchers in the list match
   Codec context input output ->
