
Quoting Bas van Dijk
On 26 January 2013 15:20, Bas van Dijk
wrote: But in aeson-HEAD it has the following type:
deriveJSON :: Options -> Name -> Q [Dec]
Note that I'm currently working on extending the encoding Options record:
* I added a constructorNameModifier :: String -> String which is applied to constructor names and is handy for lower-casing them for example.
* I extended the sumEncoding with a ObjectWithSingleField constructor which causes a constructor to be encoded to an object with a single field named after the constructor (modified by the constructorNameModifier) and the value will be the contents of the constructor.
* I'm also modifying the GHC Generics code to take the encoding Options into account.
This work is happening in my parameterize-generic-encoding-with-options branch:
Both hackage and your branch build TemplateHaskell.hs ok. I'll try and understand what you've done :) Cheers
https://github.com/basvandijk/aeson/commits/parameterize-generic-encoding-wi...
Bas