Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic instances for FromJSON/ToJSON #2

Open
ulysses4ever opened this issue Sep 12, 2019 · 3 comments
Open

Generic instances for FromJSON/ToJSON #2

ulysses4ever opened this issue Sep 12, 2019 · 3 comments

Comments

@ulysses4ever
Copy link

ulysses4ever commented Sep 12, 2019

The very convenient Generics machinery from aeson is not present here. Is there a good reason for this? Would a PR adding it be welcomed?

@hvr
Copy link
Collaborator

hvr commented Sep 12, 2019

Definitely welcomed and appreciated! I just never found the time to do it myself. I'm happy to provide assistance if needed :-)

@andreasabel
Copy link
Member

I guess this issue blocks more wide-spread adoption of microaeson.
Maybe one can copy some code from https://github.com/haskell/aeson/blob/b296cb96b7e1338dc3eb4ad1a157f77d150a001f/src/Data/Aeson/Types/FromJSON.hs.

@ulysses4ever
Copy link
Author

The current aeson implementation looks a bit too smart, and it makes use of libraries (e.g. tagged, which allows ConsFromJSON; there's probably more, that's just the first thing came up in my experiment with it). I'm also unsure about the arity polymorphism in GToJSON/GFromJSON. I'm thinking maybe taking aeson pre-1.0 would be a better match for microaeson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants