aeson v1.4.4.0 Release Notes

Release Date: 2019-06-25 // almost 5 years ago
  • ๐Ÿ†• New features:

    • โž• Adds a parameterized parser jsonWith that can be used to choose how to handle duplicate keys in objects, thanks to Xia Li-Yao.

    • โž• Add generic implementations of FromJSONKey and ToJSONKey, thanks to Xia Li-Yao. Example:

    data Foo = Bar
      deriving Generic
    
    opts :: JSONKeyOptions
    opts = defaultJSONKeyOptions { keyModifier = toLower }
    
    instance ToJSONKey Foo where
      toJSONKey = genericToJSONKey opts
    
    instance FromJSONKey Foo where
      fromJSONKey = genericFromJSONKey opts
    

    Minor:

    • aeson now uses time-compat instead of time-locale-compat, thanks to Oleg Grenrus.
    • Prepare for MonadFail breakages in GHC 8.8, thanks to Oleg Grenrus.
    • ๐Ÿ— Require bytestring >= 0.10.8.1 for newer GHCs to avoid build failures, thanks to Oleg Grenrus.
    • ๐Ÿ‘Œ Support primitive 0.7.*, thanks to Adam Bergmark.
    • Allow semigroups 0.19.* and hashable 1.3.*, thanks to Oleg Grenrus.
    • ๐Ÿ›  Fix a typo in the error message when parsing NonEmpty, thanks to Colin Woodbury.
    • Document surprising behavior when using omitNothingFields with type variables, thanks to Xia Li-Yao.

    Internal changes:

    • Code cleanup by Oleg Grenrus
    • ๐Ÿ›  Fix dependencies of the benchmarks on older GHC's, thanks to Xia Li-Yao.