packages feed

blaze-json 0.2.0 → 0.2.1

raw patch · 2 files changed

+3/−7 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

blaze-json.cabal view
@@ -1,5 +1,5 @@ name:                blaze-json-version:             0.2.0+version:             0.2.1 synopsis:            tiny library for encoding json license:             MIT license-file:        LICENSE
src/Text/Blaze/JSON/Internal.hs view
@@ -173,17 +173,13 @@         BP.char8 BP.>*< BP.char8 BP.>*< BP.word16HexFixed {-# INLINABLE escapeAscii #-} -appendWord8 :: EncodeConfig -> Word8 -> B.Builder -> B.Builder-appendWord8 cfg = \w b -> BP.primBounded (escapeAscii $ escapeHtml cfg) w <> b-{-# INLINE appendWord8 #-}- -- | utf8 encoded bytestring to JSON. since v0.2.0. -- -- >>> utf8 $ T.encodeUtf8 "\29483" -- "\"\29483\"" utf8 :: S.ByteString -> JSON utf8 t = JSON $ \cfg -> surround "\"" "\"" $-    S.foldr (appendWord8 cfg) mempty t+    BP.primMapByteStringBounded (escapeAscii $ escapeHtml cfg) t {-# INLINABLE utf8 #-}  -- | utf8 encoded lazy bytestring to JSON. since v0.2.0.@@ -192,7 +188,7 @@ -- "\"\29356\"" lazyUtf8 :: L.ByteString -> JSON lazyUtf8 t = JSON $ \cfg -> surround "\"" "\"" $-    L.foldr (appendWord8 cfg) mempty t+    BP.primMapLazyByteStringBounded (escapeAscii $ escapeHtml cfg) t {-# INLINABLE lazyUtf8 #-}  -- | json text value from Text