On 26 January 2013 15:20, Bas van Dijk <v.dijk....@gmail.com> 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:

https://github.com/basvandijk/aeson/commits/parameterize-generic-encoding-with-options

Bas

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to