packages feed

aeson 0.11.1.4 → 0.11.2.0

raw patch · 5 files changed

+27/−3 lines, 5 filesdep ~natsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: nats

API changes (from Hackage documentation)

+ Data.Aeson.Types: unsafeToEncoding :: Builder -> Encoding
- Data.Aeson: parseJSON :: FromJSON a => Value -> Parser a
+ Data.Aeson: parseJSON :: (FromJSON a, Generic a, GFromJSON (Rep a)) => Value -> Parser a
- Data.Aeson: toJSON :: ToJSON a => a -> Value
+ Data.Aeson: toJSON :: (ToJSON a, Generic a, GToJSON (Rep a)) => a -> Value
- Data.Aeson.Types: parseJSON :: FromJSON a => Value -> Parser a
+ Data.Aeson.Types: parseJSON :: (FromJSON a, Generic a, GFromJSON (Rep a)) => Value -> Parser a
- Data.Aeson.Types: toJSON :: ToJSON a => a -> Value
+ Data.Aeson.Types: toJSON :: (ToJSON a, Generic a, GToJSON (Rep a)) => a -> Value

Files

Data/Aeson/Types.hs view
@@ -14,6 +14,7 @@     -- * Core JSON types       Value(..)     , Encoding+    , unsafeToEncoding     , fromEncoding     , Series     , Array
Data/Aeson/Types/Instances.hs view
@@ -4,6 +4,11 @@     ViewPatterns #-} {-# LANGUAGE DefaultSignatures #-} +-- Needed for Tagged, Const and Proxy instances+#if __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE PolyKinds #-}+#endif+ #define NEEDS_INCOHERENT #include "overlapping-compat.h" 
Data/Aeson/Types/Internal.hs view
@@ -25,6 +25,7 @@     -- * Core JSON types       Value(..)     , Encoding(..)+    , unsafeToEncoding     , Series(..)     , Array     , emptyArray, isEmptyArray@@ -343,6 +344,13 @@       -- ^ Acquire the underlying bytestring builder.     } deriving (Semigroup,Monoid) +-- | Make Encoding from Builder.+--+-- Use with care! You have to make sure that the passed Builder+-- is a valid JSON Encoding!+unsafeToEncoding :: Builder -> Encoding+unsafeToEncoding = Encoding+ instance Show Encoding where     show (Encoding e) = show (toLazyByteString e) @@ -353,7 +361,13 @@     compare (Encoding a) (Encoding b) =       compare (toLazyByteString a) (toLazyByteString b) --- | A series of values that, when encoded, should be separated by commas.+-- | A series of values that, when encoded, should be separated by+-- commas. Since 0.11.0.0, the '.=' operator is overloaded to create+-- either @(Text, Value)@ or 'Series'. You can use Series when+-- encoding directly to a bytestring builder as in the following+-- example:+--+-- > toEncoding (Person name age) = pairs ("name" .= name <> "age" .= age) data Series = Empty             | Value Encoding             deriving (Typeable)
aeson.cabal view
@@ -1,5 +1,5 @@ name:            aeson-version:         0.11.1.4+version:         0.11.2.0 license:         BSD3 license-file:    LICENSE category:        Text, Web, JSON@@ -121,7 +121,6 @@     build-depends: time >= 1.5    if flag(developer)-    ghc-options: -Werror     ghc-prof-options: -auto-all    ghc-options: -O2 -Wall
changelog.md view
@@ -1,5 +1,10 @@ For 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). +### 0.11.2.0++* Enable `PolyKinds` to generalize `Proxy`, `Tagged`, and `Const` instances.+* Add `unsafeToEncoding` in `Data.Aeson.Types`, use with care!+ #### 0.11.1.4  * Fix build with `base >= 4.8` and `unordered-containers < 0.2.6`.