on master help sign in
expose <?>,JSONPath,parseIndexedJSON from Data.Aeson module
commitf57c850b471c7192e013aabc5668e95e7aa09c59 authorabiduzz420 <abiduzair420@gmail.com> dateWed 20 Mar 2019, 11:39 (8 years ago) parent2532376
2 files changed+6−2
Data/Aeson.hs+5−2 Data/Aeson/Types/FromJSON.hs+1
Data/Aeson.hs+5−2
@@ -63,6 +63,8 @@ module Data.Aeson
6363 , fromJSON
6464 , ToJSON(..)
6565 , KeyValue(..)
66+ , (<?>)
67+ , JSONPath
6668 -- ** Keys for maps
6769 , ToJSONKey(..)
6870 , ToJSONKeyFunction(..)
@@ -129,15 +131,16 @@ module Data.Aeson
129131 -- * Parsing
130132 , json
131133 , json'
134+ , parseIndexedJSON
132135 ) where
133136
134137import Prelude.Compat
135138
136−import Data.Aeson.Types.FromJSON (ifromJSON)
139+import Data.Aeson.Types.FromJSON (ifromJSON, parseIndexedJSON)
137140import Data.Aeson.Encoding (encodingToLazyByteString)
138141import Data.Aeson.Parser.Internal (decodeWith, decodeStrictWith, eitherDecodeWith, eitherDecodeStrictWith, jsonEOF, json, jsonEOF', json')
139142import Data.Aeson.Types
140−import Data.Aeson.Types.Internal (JSONPath, formatError)
143+import Data.Aeson.Types.Internal (JSONPath, formatError, (<?>))
141144import qualified Data.ByteString as B
142145import qualified Data.ByteString.Lazy as L
143146
Data/Aeson/Types/FromJSON.hs+1
@@ -67,6 +67,7 @@ module Data.Aeson.Types.FromJSON
6767 , explicitParseField
6868 , explicitParseFieldMaybe
6969 , explicitParseFieldMaybe'
70+ , parseIndexedJSON
7071 -- ** Operators
7172 , (.:)
7273 , (.:?)