@@ -151,6 +151,14 @@ instance FromJSON Char where
151151 else fail "Expected a string of length 1"
152152 {-# INLINE parseJSON #-}
153153
154+instance ToJSON Scientific where
155+ toJSON = Number
156+ {-# INLINE toJSON #-}
157+
158+instance FromJSON Scientific where
159+ parseJSON = withScientific "Scientific" pure
160+ {-# INLINE parseJSON #-}
161+
154162instance ToJSON Double where
155163 toJSON = realFloatToJSON
156164 {-# INLINE toJSON #-}