@@ -91,6 +91,7 @@ import Data.Vector (Vector)
91import Data.Version (Version, showVersion)
91import Data.Version (Version, showVersion)
92import Data.Word (Word16, Word32, Word64, Word8)
92import Data.Word (Word16, Word32, Word64, Word8)
93import Foreign.Storable (Storable)
93import Foreign.Storable (Storable)
94+import Foreign.C.Types (CTime (..))
94import GHC.Generics
95import GHC.Generics
95import Numeric.Natural (Natural)
96import Numeric.Natural (Natural)
96import qualified Data.Aeson.Encoding as E
97import qualified Data.Aeson.Encoding as E
@@ -1366,7 +1367,6 @@ instance ToJSONKey Int64 where
1366 toJSONKey = toJSONKeyTextEnc E.int64Text
1367 toJSONKey = toJSONKeyTextEnc E.int64Text
1367 {-# INLINE toJSONKey #-}
1368 {-# INLINE toJSONKey #-}
1370instance ToJSON Word where
1370instance ToJSON Word where
1371 toJSON = Number . fromIntegral
1371 toJSON = Number . fromIntegral
1372 {-# INLINE toJSON #-}
1372 {-# INLINE toJSON #-}
@@ -1426,6 +1426,12 @@ instance ToJSONKey Word64 where
1426 toJSONKey = toJSONKeyTextEnc E.word64Text
1426 toJSONKey = toJSONKeyTextEnc E.word64Text
1427 {-# INLINE toJSONKey #-}
1427 {-# INLINE toJSONKey #-}
1429+instance ToJSON CTime where
1430+ toJSON (CTime i) = toJSON i
1431+ {-# INLINE toJSON #-}
1433+ toEncoding (CTime i) = toEncoding i
1434+ {-# INLINE toEncoding #-}
1430instance ToJSON Text where
1436instance ToJSON Text where
1431 toJSON = String
1437 toJSON = String