@@ -43,7 +43,7 @@ import Data.ByteString.Lazy.Builder
4343
4444import Control.Applicative ((*>), (<$>), (<*), liftA2, pure)
4545import Data.Aeson.Types (Result(..), Value(..))
46−import Data.Attoparsec.Char8 (Parser, char, endOfInput, rational,
46+import Data.Attoparsec.Char8 (Parser, char, endOfInput, scientific,
4747 skipSpace, string)
4848import Data.Bits ((.|.), shiftL)
4949import Data.ByteString (ByteString)
@@ -173,7 +173,7 @@ value = do
173173 C_t -> string "true" *> pure (Bool True)
174174 C_n -> string "null" *> pure Null
175175 _ | w >= 48 && w <= 57 || w == 45
176− -> Number <$> rational
176+ -> Number <$> scientific
177177 | otherwise -> fail "not a valid json value"
178178
179179-- | Strict version of 'value'. See also 'json''.
@@ -191,7 +191,7 @@ value' = do
191191 C_n -> string "null" *> pure Null
192192 _ | w >= 48 && w <= 57 || w == 45
193193 -> do
194− !n <- rational
194+ !n <- scientific
195195 return (Number n)
196196 | otherwise -> fail "not a valid json value"
197197