-
Notifications
You must be signed in to change notification settings - Fork 25
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
[feature] Optionally suppress keys with null values #16
Comments
This should be done in the
|
I do now see However, I currently have over 50 records (with this number expected to grow) which require serialization to JSON, so the cost of additional per-record boilerplate is high. With my modification to
Unless I am missing something, without having
Although this is a 100% increase in lines for me (more in terms of tokens), perhaps this amount of boilerplate doesn't earn me any sympathy. |
Wouldn't it make more sense to write a function removeNullValues :: Value -> Value and then encode your value with |
The |
Apparently, such a feature is available in the
Data.Aeson.TH
module (seeomitNothingFields
), but that module requires thatTemplateHaskell
be enabled.The text was updated successfully, but these errors were encountered: