Fixes #68 and #66.
I've been using this module for some time now at Erudify.
@roelvandijk since you wrote the original TH code can you take a look at this. I removed the examples of the generated ToJSON and FromJSON instances from the documentation since they were not correct anymore. I don't have time right now to fix them but maybe you have.
Add support for specifying how to encode datatypes in Data.Aeson.TH
Fixes #68 and fixes #66.