@@ -311,7 +311,7 @@ instance ToJSON Integer where
311311-- specifying a scientific number with a big exponent like
312312-- @1e1000000000@.
313313instance FromJSON Integer where
314− parseJSON = withScientific "Integral" $ pure . floor
314+ parseJSON = withScientific "Integral" $ pure . truncate
315315 {-# INLINE parseJSON #-}
316316
317317instance ToJSON Int8 where
@@ -1614,5 +1614,5 @@ parseRealFloat expected v = typeMismatch expected v
16141614{-# INLINE parseRealFloat #-}
16151615
16161616parseIntegral :: Integral a => String -> Value -> Parser a
1617−parseIntegral expected = withScientific expected $ pure . floor
1617+parseIntegral expected = withScientific expected $ pure . truncate
16181618{-# INLINE parseIntegral #-}