on master help sign in
Merge pull request #688 from abiduzz420/expose-helper-functions

expose internal functions from Data.Aeson module

commitd95d985d5bcc9307090e44dd327967ee92bdeaf2 authorAdam Bergmark <adam@bergmark.nl> dateTue 2 Apr 2019, 17:35 (8 years ago) parentfe3c101fa50359
3 files changed+9−2
Data/Aeson.hs+5−2 Data/Aeson/Types/FromJSON.hs+1 changelog.md+3
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
@@ -68,6 +68,7 @@ module Data.Aeson.Types.FromJSON
6868 , explicitParseField
6969 , explicitParseFieldMaybe
7070 , explicitParseFieldMaybe'
71+ , parseIndexedJSON
7172 -- ** Operators
7273 , (.:)
7374 , (.:?)
changelog.md+3
@@ -1,5 +1,8 @@
11For the latest version of this document, please see [https://github.com/bos/aeson/blob/master/changelog.md](https://github.com/bos/aeson/blob/master/changelog.md).
22
3+## Upcoming
4+* Exposes internal helper functions like `<?>`, `JSONPath`, and `parseIndexedJSON` from `Data.Aeson` module. Does not include any breaking changes.
5+
36### 1.4.2.0
47
58* Add `Data.Aeson.QQ.Simple` which is a simpler version of the `aeson-qq` package, it does not support interpolation, thanks to Oleg Grenrus.