All Versions
59
Latest Version
Avg Release Cycle
57 days
Latest Release
-

Changelog History
Page 4

  • v1.2.0.0 Changes

    • 0️⃣ tagSingleConstructors, an option to encode single-constructor types as tagged sums was added to Options. It is disabled by default for backward compatibility.

    • 0️⃣ The cffi flag is now turned off (False) by default, this means C FFI code is no longer used by default. You can flip the flag to get C implementation.

    • 0️⃣ The Options constructor is no longer exposed to prevent new options from being breaking changes, use defaultOptions instead.

    • The contents of GToJSON and GToEncoding are no longer exposed.

    • 🚚 Some INLINE pragmas were removed to avoid GHC running out of simplifier ticks.

  • v1.1.2.0 Changes

    • 🛠 Fix an accidental change in the format of deriveJSON. Thanks to Xia Li-yao!

    • 📚 Documentation improvements regarding ToJSON, FromJSON, and SumEncoding. Thanks to Xia Li-yao and Lennart Spitzner!

  • v1.1.1.0 Changes

    • ➕ Added a pure implementation of the C FFI code, the C FFI code. If you wish to use the pure haskell version set the cffi flag to False. This should make aeson compile when C isn't available, such as for GHCJS. Thanks to James Parker & Marcin Tolysz!

    • ✅ Using the fast flag can no longer cause a test case to fail. As far as we know this didn't affect any users of the library itself. Thanks to Xia Li-yao!

  • v1.1.0.0 Changes

    • ➕ Added instances for UUID.

    • 📜 The operators for parsing fields now have named aliases:

      • .: => parseField
      • .:? => parseFieldMaybe
      • .:! => parseFieldMaybe'
      • These functions now also have variants with explicit parser functions: explicitParseField, explicitParseFieldMaybe, "explicitParseFieldMaybe'` Thanks to Oleg Grenrus.
    • ToJSONKey (Identity a) and FromJSONKey (Identity a) no longer require the unnecessary FromJSON a constraint. Thanks to Oleg Grenrus.

    • ➕ Added Data.Aeson.Encoding.pair' which is a more general version of Data.Aeson.Encoding.pair. Thanks to Andrew Martin.

    • Days BCE are properly encoded and + is now a valid prefix for Days CE. Thanks to Matt Parsons.

    • Some commonly used ToJSON instances are now specialized in order to improve compile time. Thanks to Bartosz Nitka.

    JSONTestSuite cleanups, all motivated by tighter RFC 7159 compliance:

    ✅ Over 90% of JSONTestSuite tests currently pass. The remainder can be categorised as follows:

    • 📜 The string parser is strict with Unicode compliance where the RFC leaves room for implementation-defined behaviour (tests prefixed with "i_string_". (This is necessary because the text library cannot accommodate invalid Unicode.)

    • 📜 The parser does not (and will not) support UTF-16, UTF-32, or byte order marks (BOM).

    • 📜 The parser accepts unescaped control characters, even though the RFC states that control characters must be escaped. (This may change at some point, but doesn't seem important.)

  • v1.0.2.1 Changes

    • 🛠 Fixes a regression where a bunch of valid characters caused an "Invalid UTF8-Stream" error when decoding. Thanks to Vladimir Shabanov who investigated and fixed this.
  • v1.0.2.0 Changes

    • 🛠 Fixes a regression where it was no longer possible to derive instances for types such as data T a = T { f1 :: a, f2 :: Maybe a }.

    Thanks to Sean Leather for fixing this, and to Ryan Scott for helping out.

  • v1.0.1.0 Changes

    • 🐎 Decoding performance has been significantly improved (see https://github.com/bos/aeson/pull/452). Thanks to @winterland1989.

    • ➕ Add ToJSON/FromJSON instances for newtypes from Data.Semigroup: Min, Max, First, Last, WrappedMonoid, Option. Thanks to Lennart Spitzner.

    • 📚 Make the documentation for .:! more accurate. Thanks to Ian Jeffries.

  • v1.0.0.0 Changes

    April 07, 2018

    Major enhancements:

    • Introduced new FromJSONKey and ToJSONKey type classes that are used to encode maps without going through HashMap. This also allows arbitrary serialization of keys where a string-like key will encode into an object and other keys will encode into an array of key-value tuples.

    • ➕ Added higher rank classes: ToJSON1, ToJSON2, FromJSON1, and FromJSON2.

    • ➕ Added Data.Aeson.Encoding with functions to safely write ToJSON instances using toEncoding.

    Other enhancements:

    • A Cabal fast flag was added to disable building with optimizations. This drastically speeds up compiling both aeson and libraries using aeson so it is recommended to enable it during development. With cabal-install you can cabal install aeson -ffast and with stack you can add a flag section to your stack.yaml:

      flags:
      aeson:
      fast: true
      
    • ➕ Added list specific members to ToJSON and FromJSON classes. In the same way Read and Show handle lists specifically. This removes need for overlapping instances to handle String.

    • ➕ Added a new sumEncoding option UntaggedValue which prevents objects from being tagged with the constructor name.

    • JSONPaths are now tracked in instances derived with template-haskell and generics.

    • Get rid of redundancy of JSONPath error messages in nested records.

    eitherDecode "{\"x\":{\"a\": [1,2,true]}}" :: Either String Y previously yielded Error in $.x.a[2]: failed to parse field" x: failed to parse field a: expected Int, encountered Boolean and now yields Error in $.x.a[2]: expected Int, encountered Boolean".

    Some users might prefer to insert modifyFailure themselves to customize error messages, which previously prevented the use of (.:).

    • ✅ Backwards compatibility with bytestring-0.9 using the bytestring-builder compatibility package.

    • Export decodeWith, decodeStrictWith, eitherDecodeWith, and eitherDecodeStrictWith from Data.Aeson.Parser. This allows decoding using explicit parsers instead of using FromJSON instances.

    • Un-orphan internal instances to render them in haddocks.

    Other changes:

    • Integral FromJSON instances now only accept integral values. E.g. parsing 3.14 to Int fails instead of succeeding with the value 3.

    • Over/underflows are now caught for bounded numeric types.

    • ✂ Remove the contents field encoding with allNullaryToStringTag = False, giving us { "tag" : "c1" } instead of { "tag" : "c1", contents : [] }. The contents field is optional when parsing so this is only a breaking change for ToJSON instances.

    • 🛠 Fix a bug where genericToEncoding with unwrapUnaryRecords = True would produce an invalid encoding: "unwrap\":"".

    • ToJSON instances using genericToEncoding and omitNothingFields no longer produce invalid JSON.

    • ➕ Added instances for DList, Compose, Product, Sum.

  • v0.11.2.0 Changes

    • Enable PolyKinds to generalize Proxy, Tagged, and Const instances.
    • ➕ Add unsafeToEncoding in Data.Aeson.Types, use with care!
  • v0.11.1.4 Changes

    • 🛠 Fix build with base >= 4.8 and unordered-containers < 0.2.6.