[Haskell-cafe] aeson-0.6.1.0 deriveJSON error
Bas van Dijk
v.dijk.bas at gmail.com
Sat Jan 26 15:34:19 CET 2013
On 26 January 2013 15:20, Bas van Dijk <v.dijk.bas at 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
More information about the Haskell-Cafe
mailing list