Merge pull request #83 from basvandijk/master
Parse a strict ByteString to a JSON.Value directly using eitherDecodeStrict'
commit0d90fe340f065948555634af61d20206576265a7
authorLeon P Smith <leon@melding-monads.com>
dateTue 17 Sep 2013, 07:38 (13 years ago)
parent2b963a89f2e4d0
postgresql-simple.cabal+1−1
@@ -52,7 +52,7 @@ Library
5252 Database.PostgreSQL.Simple.TypeInfo.Types
5353
5454 Build-depends:
55− aeson >= 0.6,
55+ aeson >= 0.6.2,
5656 attoparsec >= 0.10.3,
5757 base < 5,
5858 blaze-builder,
src/Database/PostgreSQL/Simple/FromField.hs+1−1
@@ -452,7 +452,7 @@ instance FromField JSON.Value where
452452 else case mbs of
453453 Nothing -> returnError UnexpectedNull f ""
454454 Just bs ->
455− case JSON.eitherDecode' $ LB.fromChunks [bs] of
455+ case JSON.eitherDecodeStrict' bs of
456456 Left err -> returnError ConversionFailed f err
457457 Right val -> pure val
458458