Commits

Michael Thompson committed 1fac2ad

edited Data.Aeson.Encoding,
ghc complains "null" is not a Builder;
but fromByteString "null" is a Builder

  • Participants
  • Parent commits 08888f1

Comments (0)

Files changed (1)

File Data/Aeson/Encode.hs

 fromNumber :: Number -> Builder
 fromNumber (I i) = integral i
 fromNumber (D d)
-    | isNaN d || isInfinite d = "null"
+    | isNaN d || isInfinite d = fromByteString "null"
     | otherwise               = double d
 
 -- | Efficiently serialize a JSON value as a lazy 'L.ByteString'.