The pantry
package exposes ‘do not rely on’ module Pantry.Internal.AesonExtended
which, essentially, adds the following functionality:
-
type WarningParser a = WriterT WarningParserMonoid Parser a
- a JSON parser that warns about unexpected fields in objects (and a lot that flows from that) -
(.:) :: FromJSON a => Object -> Text -> Parser a
- extends the.:
warning to include the field name. -
(.:?) :: FromJSON a => Object -> Text -> Parser (Maybe a)
- extends the.:?
warning to include the field name.
Since it was first published in 2019, the module’s Haddock documentation has said that the intention is to ‘remove the module’. I assume that means either move the functionality to a new package, and/or replace the dependency of Stack/Pantry on it with functionality provided by an existing package that does the same thing.
My questions are these:
- is there an existing package that does much the same thing?
- if not, is there an existing package where this sort of functionality could be usefully added?
- if not, should I seek to move the functionality into a new package? Pantry is not a natural place for people to look if they want to extend Aeson.