@@ -109,6 +109,7 @@ module Servant.Docs
109109
110110import Control.Lens hiding (Action)
111111import Data.Aeson
112+import Data.Aeson.Encode.Pretty (encodePretty)
112113import Data.ByteString.Lazy.Char8 (ByteString)
113114import Data.Hashable
114115import Data.HashMap.Strict (HashMap)
@@ -333,7 +334,7 @@ instance ToSample () where
333334 toSample = Just ()
334335
335336sampleByteString :: forall a . ToSample a => Proxy a -> Maybe ByteString
336−sampleByteString Proxy = fmap encode (toSample :: Maybe a)
337+sampleByteString Proxy = fmap encodePretty (toSample :: Maybe a)
337338
338339-- | The class that helps us automatically get documentation
339340-- for GET parameters.
@@ -605,4 +606,4 @@ toHtml md =
605606 "</pre>" ++
606607 "</body>" ++
607608 "</html>"
608−-}
609+-}