aeson v1.4.7.0 Release Notes

Release Date: 2020-03-20 // about 4 years ago
  • ๐Ÿš€ Long overdue release (once again), so there's quite a bit of stuff ๐Ÿš€ included even though it's a "minor" release. Big thanks to all the contributors, the project would not exist without you!

    Special thanks to Oleg Grenrus and Xia Li-Yao for reviewing tons of stuff.

    ๐Ÿ†• New stuff:

    • โž• Add rejectUnknownFields to Options which rejects unknown fields on deserialization. Useful to find errors during development, but enabling this should be considered a breaking change as previously accepted inputs may now be rejected. Thanks to rmanne.
    instance FromJSON Foo where
      parseJSON = gParseJSON defaultOptions { rejectUnknownFields = True }
    
    • ๐Ÿ“œ FromJSON instance of Ratio a now parses numbers in addtion to standard {numerator=..., denumerator=...} encoding. Thanks to Aleksey Khudyakov.

    • โž• Add more information to parse errors, including a sample of the surrounding text. Hopefully this will lead to less "Failed to read: satisfy" confusion! Thanks to Sasha Bogicevic. We expect some downstream test suites to break because of this, apologies in advance. Hopefully you will like the improvement anyway :-)

    • โž• Add parseFail to Data.Aeson.Types. parseFail = fail but doesn't require users to know about MonadFail. Thanks to Colin Woodbury.

    • ๐Ÿ‘‰ Make Template Haskell type family detection smarter when deriving ToJSON1 instances, thanks to Ryan Scott.

    • โšก๏ธ Optimize string parsing for the common case of strings without escapes, thanks to Yuras.

    Misc:

    • โš  Clean up compiler warnings and switch from base-compat to base-compat-batteries. Thanks to Colin Woodbury & Oleg Grenrus.

    • ๐Ÿ“š Clarification & fixes to documentation regarding treatment of Maybe fields, thanks to Roman Cheplyaka.

    • โž• Add documentation for internal development workflows. Thanks to Guru Devanla.

    • โฌ‡๏ธ Drop support for GHC < 7.8. We've chosen to support older GHCs as long as it doesn't prevent us from adding new features, but now it does! Thanks to Oleg Grenrus for the patch.

    • ๐Ÿ‘ Allow generic-deriving 1.13 in test suite.

    • ๐Ÿ›  Some DRY fixes thanks to Mark Fajkus.