Closed
Description
Is your change request related to a problem? Please describe.
Can we support optional fields to Maybe? In particular, treat undefined values as Nothing.
Both should be decode to { a: Nothing }
{}
{"a": null}
Describe the solution you'd like
I propose adding a new
class DecodeJsonField a where
decodeJsonField :: Maybe Json -> Maybe (Either JsonDecodeError a)
and using it within the decoding.
I am also of the opinion of encoding Nothing
should encode to an undefined field - but that can be a separate matter.
Metadata
Metadata
Assignees
Labels
No labels