Skip to content
Permalink
Browse files

Reject floating point numbers that lack a fractional part

Once again, this was identified by JSONTestSuite, and is disallowed
by RFC 7159.
  • Loading branch information...
bos committed Oct 28, 2016
1 parent df61ba7 commit ecfca35a45286dbe2bbaf5f62354be393bc59b66
Showing with 1 addition and 6 deletions.
  1. +1 −1 Data/Aeson/Parser/Internal.hs
  2. +0 −5 tests/UnitTests.hs
@@ -328,7 +328,7 @@ scientific = do
dotty <- A.peekWord8
-- '.' -> ascii 46
SP c e <- case dotty of
Just 46 -> A.anyWord8 *> (f <$> A.takeWhile isDigit_w8)
Just 46 -> A.anyWord8 *> (f <$> A.takeWhile1 isDigit_w8)
_ -> pure (SP n 0)

let !signedCoeff | positive = c
@@ -667,11 +667,6 @@ _blacklist = HashSet.fromList [
, "i_string_not_in_unicode_range.json"
, "i_string_truncated-utf-8.json"
, "i_structure_UTF-8_BOM_empty_object.json"
, "n_number_-2..json"
, "n_number_0.e1.json"
, "n_number_2.e+3.json"
, "n_number_2.e-3.json"
, "n_number_2.e3.json"
, "n_number_neg_int_starting_with_zero.json"
, "n_number_real_without_fractional_part.json"
, "n_number_with_leading_zero.json"

0 comments on commit ecfca35

Please sign in to comment.
You can’t perform that action at this time.