@@ -170,7 +170,7 @@ instance FromJSON Double where
171instance ToJSON Number where
171instance ToJSON Number where
172 toJSON (D d) = toJSON d
172 toJSON (D d) = toJSON d
173− toJSON (I i) = Number $ fromInteger i
173+ toJSON (I i) = toJSON i
174 {-# INLINE toJSON #-}
174 {-# INLINE toJSON #-}
176instance FromJSON Number where
176instance FromJSON Number where
@@ -222,7 +222,7 @@ parseIntegral = withScientific "Integral" $ pure . floor
222{-# INLINE parseIntegral #-}
222{-# INLINE parseIntegral #-}
224instance ToJSON Integer where
224instance ToJSON Integer where
225− toJSON = Number . fromIntegral
225+ toJSON = Number . fromInteger
226 {-# INLINE toJSON #-}
226 {-# INLINE toJSON #-}
228instance FromJSON Integer where
228instance FromJSON Integer where