@@ -120,7 +120,7 @@ import Text.ParserCombinators.ReadP (readP_to_S)
120import Foreign.Storable (Storable)
120import Foreign.Storable (Storable)
121import Numeric.Natural (Natural)
121import Numeric.Natural (Natural)
122import Prelude hiding (foldr)
122import Prelude hiding (foldr)
123−import qualified Data.Aeson.Encode.Builder as E
123+import qualified Data.Aeson.Encode.Builder as EB
124import qualified Data.Aeson.Parser.Time as Time
124import qualified Data.Aeson.Parser.Time as Time
125import qualified Data.ByteString.Builder as B
125import qualified Data.ByteString.Builder as B
126import qualified Data.ByteString.Lazy as L
126import qualified Data.ByteString.Lazy as L
@@ -201,7 +201,7 @@ realFloatToJSON d
202realFloatToEncoding :: RealFloat a => a -> Encoding
202realFloatToEncoding :: RealFloat a => a -> Encoding
203realFloatToEncoding d
203realFloatToEncoding d
204− | isNaN d || isInfinite d = Encoding E.null_
204+ | isNaN d || isInfinite d = Encoding EB.null_
205 | otherwise = toEncoding (Scientific.fromFloatDigits d)
205 | otherwise = toEncoding (Scientific.fromFloatDigits d)
206{-# INLINE realFloatToEncoding #-}
206{-# INLINE realFloatToEncoding #-}
@@ -291,7 +291,7 @@ instance ToJSON1 Maybe where
291 {-# INLINE liftToJSON #-}
291 {-# INLINE liftToJSON #-}
293 liftToEncoding to _ (Just a) = to a
293 liftToEncoding to _ (Just a) = to a
294− liftToEncoding _ _ Nothing = Encoding E.null_
294+ liftToEncoding _ _ Nothing = Encoding EB.null_
295 {-# INLINE liftToEncoding #-}
295 {-# INLINE liftToEncoding #-}
297instance (ToJSON a) => ToJSON (Maybe a) where
297instance (ToJSON a) => ToJSON (Maybe a) where
@@ -369,7 +369,7 @@ instance ToJSON Bool where
369 toJSON = Bool
369 toJSON = Bool
370 {-# INLINE toJSON #-}
370 {-# INLINE toJSON #-}
372− toEncoding = Encoding . E.bool
372+ toEncoding = Encoding . EB.bool
373 {-# INLINE toEncoding #-}
373 {-# INLINE toEncoding #-}
375instance FromJSON Bool where
375instance FromJSON Bool where
@@ -415,10 +415,10 @@ instance ToJSON Char where
415 toJSONList = String . T.pack
415 toJSONList = String . T.pack
416 {-# INLINE toJSONList #-}
416 {-# INLINE toJSONList #-}
418− toEncoding = Encoding . E.string . (:[])
418+ toEncoding = Encoding . EB.string . (:[])
419 {-# INLINE toEncoding #-}
419 {-# INLINE toEncoding #-}
421− toEncodingList = Encoding . E.string
421+ toEncodingList = Encoding . EB.string
422 {-# INLINE toEncodingList #-}
422 {-# INLINE toEncodingList #-}
424instance FromJSON Char where
424instance FromJSON Char where
@@ -490,7 +490,7 @@ instance HasResolution a => ToJSON (Fixed a) where
490 toJSON = Number . realToFrac
490 toJSON = Number . realToFrac
491 {-# INLINE toJSON #-}
491 {-# INLINE toJSON #-}
493− toEncoding = Encoding . E.number . realToFrac
493+ toEncoding = Encoding . EB.number . realToFrac
494 {-# INLINE toEncoding #-}
494 {-# INLINE toEncoding #-}
496-- | /WARNING:/ Only parse fixed-precision numbers from trusted input
496-- | /WARNING:/ Only parse fixed-precision numbers from trusted input
@@ -643,7 +643,7 @@ instance ToJSON Text where
643 toJSON = String
643 toJSON = String
644 {-# INLINE toJSON #-}
644 {-# INLINE toJSON #-}
646− toEncoding = Encoding . E.text
646+ toEncoding = Encoding . EB.text
647 {-# INLINE toEncoding #-}
647 {-# INLINE toEncoding #-}
649instance FromJSON Text where
649instance FromJSON Text where
@@ -656,7 +656,7 @@ instance ToJSON LT.Text where
657 toEncoding t = Encoding $
657 toEncoding t = Encoding $
658 B.char7 '"' <>
658 B.char7 '"' <>
659− LT.foldrChunks (\x xs -> E.unquoted x <> xs) (B.char7 '"') t
659+ LT.foldrChunks (\x xs -> EB.unquoted x <> xs) (B.char7 '"') t
660 {-# INLINE toEncoding #-}
660 {-# INLINE toEncoding #-}
662instance FromJSON LT.Text where
662instance FromJSON LT.Text where
@@ -716,7 +716,7 @@ instance ToJSON Scientific where
716 toJSON = Number
716 toJSON = Number
717 {-# INLINE toJSON #-}
717 {-# INLINE toJSON #-}
719− toEncoding = Encoding . E.number
719+ toEncoding = Encoding . EB.number
720 {-# INLINE toEncoding #-}
720 {-# INLINE toEncoding #-}
722instance FromJSON Scientific where
722instance FromJSON Scientific where
@@ -1047,7 +1047,7 @@ instance ToJSON Value where
1047 toJSON a = a
1047 toJSON a = a
1048 {-# INLINE toJSON #-}
1048 {-# INLINE toJSON #-}
1050− toEncoding = Encoding . E.encodeToBuilder
1050+ toEncoding = Encoding . EB.encodeToBuilder
1051 {-# INLINE toEncoding #-}
1051 {-# INLINE toEncoding #-}
1053instance FromJSON Value where
1053instance FromJSON Value where
@@ -1078,21 +1078,21 @@ instance FromJSON DotNetTime where
1079instance ToJSON Day where
1079instance ToJSON Day where
1080 toJSON = stringEncoding
1080 toJSON = stringEncoding
1081− toEncoding z = Encoding (E.quote $ E.day z)
1081+ toEncoding z = Encoding (EB.quote $ EB.day z)
1083instance FromJSON Day where
1083instance FromJSON Day where
1084 parseJSON = withText "Day" (Time.run Time.day)
1084 parseJSON = withText "Day" (Time.run Time.day)
1086instance ToJSON TimeOfDay where
1086instance ToJSON TimeOfDay where
1087 toJSON = stringEncoding
1087 toJSON = stringEncoding
1088− toEncoding z = Encoding (E.quote $ E.timeOfDay z)
1088+ toEncoding z = Encoding (EB.quote $ EB.timeOfDay z)
1090instance FromJSON TimeOfDay where
1090instance FromJSON TimeOfDay where
1091 parseJSON = withText "TimeOfDay" (Time.run Time.timeOfDay)
1091 parseJSON = withText "TimeOfDay" (Time.run Time.timeOfDay)
1093instance ToJSON LocalTime where
1093instance ToJSON LocalTime where
1094 toJSON = stringEncoding
1094 toJSON = stringEncoding
1095− toEncoding z = Encoding (E.quote $ E.localTime z)
1095+ toEncoding z = Encoding (EB.quote $ EB.localTime z)
1097instance FromJSON LocalTime where
1097instance FromJSON LocalTime where
1098 parseJSON = withText "LocalTime" (Time.run Time.localTime)
1098 parseJSON = withText "LocalTime" (Time.run Time.localTime)
@@ -1100,7 +1100,7 @@ instance FromJSON LocalTime where
1100instance ToJSON ZonedTime where
1100instance ToJSON ZonedTime where
1101 toJSON = stringEncoding
1101 toJSON = stringEncoding
1103− toEncoding z = Encoding (E.quote $ E.zonedTime z)
1103+ toEncoding z = Encoding (EB.quote $ EB.zonedTime z)
1105formatMillis :: (FormatTime t) => t -> String
1105formatMillis :: (FormatTime t) => t -> String
1106formatMillis = take 3 . formatTime defaultTimeLocale "%q"
1106formatMillis = take 3 . formatTime defaultTimeLocale "%q"
@@ -1111,7 +1111,7 @@ instance FromJSON ZonedTime where
1111instance ToJSON UTCTime where
1111instance ToJSON UTCTime where
1112 toJSON = stringEncoding
1112 toJSON = stringEncoding
1114− toEncoding t = Encoding (E.quote $ E.utcTime t)
1114+ toEncoding t = Encoding (EB.quote $ EB.utcTime t)
1116-- | Encode something to a JSON string.
1116-- | Encode something to a JSON string.
@@ -1133,7 +1133,7 @@ instance ToJSON NominalDiffTime where
1133 toJSON = Number . realToFrac
1133 toJSON = Number . realToFrac
1134 {-# INLINE toJSON #-}
1134 {-# INLINE toJSON #-}
1136− toEncoding = Encoding . E.number . realToFrac
1136+ toEncoding = Encoding . EB.number . realToFrac
1137 {-# INLINE toEncoding #-}
1137 {-# INLINE toEncoding #-}
1139-- | /WARNING:/ Only parse lengths of time from trusted input
1139-- | /WARNING:/ Only parse lengths of time from trusted input
@@ -1224,7 +1224,7 @@ instance ToJSON (Proxy a) where
1224 toJSON _ = Null
1224 toJSON _ = Null
1225 {-# INLINE toJSON #-}
1225 {-# INLINE toJSON #-}
1227− toEncoding _ = Encoding E.null_
1227+ toEncoding _ = Encoding EB.null_
1228 {-# INLINE toEncoding #-}
1228 {-# INLINE toEncoding #-}
1230instance FromJSON (Proxy a) where
1230instance FromJSON (Proxy a) where