aeson-pretty 0.8.10 → 0.8.11
raw patch · 4 files changed
+29/−22 lines, 4 filesdep −semigroupsdep ~aesondep ~basePVP ok
version bump matches the API change (PVP)
Dependencies removed: semigroups
Dependency ranges changed: aeson, base
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +5/−1
- Data/Aeson/Encode/Pretty.hs +5/−4
- aeson-pretty.cabal +9/−15
- cli-tool/Main.hs +10/−2
CHANGELOG.markdown view
@@ -1,7 +1,11 @@ # aeson-pretty changelog -## 0.8.10+## 0.8.11+ * Dropped support for Aeson 1.4 and older+ * Added support for Aeson 2.3 * Added support for Aeson 2.2++## 0.8.10 * Added support for Aeson 2.1 ## 0.8.9
Data/Aeson/Encode/Pretty.hs view
@@ -95,10 +95,11 @@ data Indent = Spaces Int | Tab data NumberFormat- -- | The standard behaviour of the 'Aeson.encode' function. Uses- -- integer literals for integers (1, 2, 3...), simple decimals- -- for fractional values between 0.1 and 9,999,999, and scientific- -- notation otherwise.+ -- | For numbers with absolute value less than 1e19, this follows the standard+ -- behaviour of the 'Data.Aeson.encode' function. Uses integer literals for+ -- integers (1, 2, 3...), simple decimals for fractional values between 0.1+ -- and 9,999,999, and scientific notation otherwise. For numbers with an+ -- absolute value larger than 1e19, always uses scientific notation. = Generic -- | Scientific notation (e.g. 2.3e123). | Scientific
aeson-pretty.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: aeson-pretty-version: 0.8.10+version: 0.8.11 license: BSD3 license-file: LICENSE category: Text, Web, JSON, Pretty Printer@@ -14,7 +14,7 @@ synopsis: JSON pretty-printing library and command-line tool. description: A JSON pretty-printing library compatible with aeson as well as- a command-line tool to improve readabilty of streams of JSON data.+ a command-line tool to improve readability of streams of JSON data. . The /library/ provides the function "encodePretty". It is a drop-in replacement for aeson's "encode" function, producing JSON-ByteStrings for@@ -22,27 +22,26 @@ . The /command-line tool/ reads JSON from stdin and writes prettified JSON to stdout. It also offers a complementary "compact"-mode, essentially the- opposite of pretty-printing. If you specify @-flib-only@ like this- .- > cabal install -flib-only aeson-pretty- .- the command-line tool will NOT be installed.+ opposite of pretty-printing. extra-source-files: README.markdown++extra-doc-files: CHANGELOG.markdown flag lib-only description: Only build/install the library, NOT the command-line tool. default: False+ manual: True library exposed-modules: Data.Aeson.Encode.Pretty build-depends:- aeson ^>=1.1 || ^>=1.2 || ^>=1.3 || ^>=1.4 || ^>=1.5 || ^>=2.0 || ^>=2.1 || ^>=2.2,- base >= 4.5,+ aeson >=1.5 && <2.4,+ base >= 4.10 && < 4.23, base-compat >= 0.9, bytestring >= 0.9, scientific >= 0.3,@@ -50,10 +49,6 @@ text >= 0.11, unordered-containers >= 0.2.14.0 - if !impl(ghc >= 8.0)- build-depends:- semigroups >= 0.18.2- ghc-options: -Wall default-language: Haskell2010 @@ -71,12 +66,11 @@ aeson-pretty, attoparsec >= 0.10, attoparsec-aeson,- base == 4.*,+ base >= 4.10 && < 4.23, bytestring >= 0.9, cmdargs >= 0.7 ghc-options: -Wall- ghc-prof-options: -auto-all default-language: Haskell2010 source-repository head
cli-tool/Main.hs view
@@ -1,10 +1,14 @@-{-# LANGUAGE DeriveDataTypeable, RecordWildCards, OverloadedStrings #-}+{-# LANGUAGE CPP, DeriveDataTypeable, RecordWildCards, OverloadedStrings, PackageImports #-} module Main (main) where import Prelude hiding (interact, concat, unlines, null) import Data.Aeson (Value(..), encode) import Data.Aeson.Encode.Pretty-import Data.Aeson.Parser.Internal (value')+#if MIN_VERSION_aeson(2,2,0)+import "attoparsec-aeson" Data.Aeson.Parser.Internal (value')+#else+import "aeson" Data.Aeson.Parser.Internal (value')+#endif import Data.Attoparsec.Lazy (Result(..), parse) import Data.ByteString.Lazy.Char8 (ByteString, interact, unlines, null) import Data.Version (showVersion)@@ -16,7 +20,11 @@ , indent :: Int , sort :: Bool }+#if __GLASGOW_HASKELL__ >= 912+ deriving (Data)+#else deriving (Data, Typeable)+#endif opts :: Options opts = Opts