-
Notifications
You must be signed in to change notification settings - Fork 3
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
library on top of this which provides an aeson-like experience? #1
Comments
I’m in favor of this as well. I even put a mild CTA in the readme about this. The easy, one-option-in-the-design-space parts are the encoding typeclass and codecs for integral types, bool, text, list. The thornier questions are:
|
Oh, and I forgot, the thorniest question of all: What to do about Maybe? If you use JSON’s null, then nested Maybes are busted. (Also, any data type that could encode itself as null would be busted when used as the type argument to Maybe). But nesting Maybes is really uncommon, and people usually want the “null is Maybe” behavior. Aeson never figured out a good answer to this problem. Maybe there’s one out there. |
rust's most popular json serializing/deserializing library does the 'null is Nothing' behavior https://docs.rs/serde_json/0.7.4/src/serde_json/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-0.7.4/src/de.rs.html#535 nested Maybe where |
I started working on this but haven't pushed yet |
aeson has an extremely nice api. it's very easy to write ToJSON/FromJSON instances manually, and its generics machinery is great. i think there should be a library written on top of this which offers a similar experience. then i wouldn't have a reason to use aeson most of the time.
The text was updated successfully, but these errors were encountered: