@@ -288,6 +288,8 @@ object = Object . M.fromList
288288-- instance ToJSON Coord where
289289-- toJSON (Coord x y) = 'object' [\"x\" '.=' x, \"y\" '.=' y]
290290-- @
291+--
292+-- This example assumes the OverloadedStrings language option is enabled.
291293class ToJSON a where
292294 toJSON :: a -> Value
293295
@@ -310,6 +312,8 @@ class ToJSON a where
310312-- \-- A non-'Object' value is of the wrong type, so use 'mzero' to fail.
311313-- parseJSON _ = 'mzero'
312314-- @
315+--
316+-- This example assumes the OverloadedStrings language option is enabled.
313317class FromJSON a where
314318 parseJSON :: Value -> Parser a
315319