jsonifier 0.1.2.1 → 0.2
raw patch · 2 files changed
+18/−7 lines, 2 filesdep ~ptr-pokerPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ptr-poker
API changes (from Hackage documentation)
- Jsonifier: writeJson :: Write -> Json
+ Jsonifier: fromByteString :: ByteString -> Json
+ Jsonifier: fromWrite :: Write -> Json
Files
- jsonifier.cabal +2/−2
- library/Jsonifier.hs +16/−5
jsonifier.cabal view
@@ -1,5 +1,5 @@ name: jsonifier-version: 0.1.2.1+version: 0.2 synopsis: Fast and simple JSON encoding toolkit description: Minimalistic library for encoding JSON directly to strict bytestring,@@ -43,7 +43,7 @@ build-depends: base >=4.11 && <5, bytestring >=0.10.10 && <0.12,- ptr-poker >=0.1.1.3 && <0.2,+ ptr-poker >=0.1.2.2 && <0.2, scientific >=0.3.6.2 && <0.4, text >=1 && <2
library/Jsonifier.hs view
@@ -28,7 +28,8 @@ object, -- ** Low-level- writeJson,+ fromByteString,+ fromWrite, ) where @@ -59,8 +60,6 @@ -- * Json --------------------------- -- | -- Specification of how to render a JSON value to 'ByteString'. -- Sort of a JSON-specialized 'ByteString' builder.@@ -216,6 +215,18 @@ Poke.openingCurlyBracket <> bodyPoke <> Poke.closingCurlyBracket -- |+-- Any JSON literal manually rendered as ByteString.+--+-- This is a low-level function allowing to avoid unnecessary processing+-- in cases where you already have a rendered JSON at hand.+--+-- __Warning:__+--+-- It is your responsibility to ensure that the content is correct JSON.+fromByteString :: ByteString.ByteString -> Json+fromByteString = Json . Write.byteString++-- | -- Any JSON literal manually rendered as Write. -- -- This is a low-level function allowing to avoid unnecessary processing@@ -230,5 +241,5 @@ -- -- It is your responsibility to ensure that the content is correct, -- otherwise you may produce invalid JSON.-writeJson :: Write.Write -> Json-writeJson = coerce+fromWrite :: Write.Write -> Json+fromWrite = Json