@@ -367,6 +367,7 @@ instance FromJSON Double where
367367 parseJSON (Number n) = case n of
368368 D d -> pure d
369369 I i -> pure (fromIntegral i)
370+ parseJSON Null = pure (0/0)
370371 parseJSON v = typeMismatch "Double" v
371372 {-# INLINE parseJSON #-}
372373
@@ -376,6 +377,7 @@ instance ToJSON Number where
376377
377378instance FromJSON Number where
378379 parseJSON (Number n) = pure n
380+ parseJSON Null = pure (D (0/0))
379381 parseJSON v = typeMismatch "Number" v
380382 {-# INLINE parseJSON #-}
381383
@@ -387,6 +389,7 @@ instance FromJSON Float where
387389 parseJSON (Number n) = case n of
388390 D d -> pure . fromRational . toRational $ d
389391 I i -> pure (fromIntegral i)
392+ parseJSON Null = pure (0/0)
390393 parseJSON v = typeMismatch "Float" v
391394 {-# INLINE parseJSON #-}
392395