Decode null to ()
Sometimes you always expect null in a certain field and it would be great if that could get decoded to ().
See discussion in https://github.com/bos/aeson/issues/542
Would it be then acceptable to add another unit type to aeson? Currently I have to use Maybe () which is confusing.
Proxy () encodes to / decodes from null
Since this issue had been opened we changed () instance so it accepts everything.
To clarify, @domenkozar do you want to check that the field is exactly null. Have you tried Proxy anything, or would you prefer having data Null = Null in aeson?
Both work for my use case.
Ok. Then I don't think we need to anything. We'll keep data Null = Null idea, but that can be added at anytime if there's really good reasoning.