-
-
Notifications
You must be signed in to change notification settings - Fork 3
Support nullptr_t #39
Copy link
Copy link
Open
Labels
code-generationInvolves generation of parser / serializer codeInvolves generation of parser / serializer codeminorA minor issueA minor issue
Metadata
Metadata
Assignees
Labels
code-generationInvolves generation of parser / serializer codeInvolves generation of parser / serializer codeminorA minor issueA minor issue
Projects
Status
Low Priority
I have realized that when
skipEmptyFieldsis true, there is no way to outputnullinto the JSON. A possible solution for this very niche use case would be to add aNullTypeclass that would be used forstd::nullptr_tand would always serialize asnulland when parsed, it would just throwTYPE_MISMATCHif the value is anything else. I would like to add this mainly because it's a pretty elegant use of the available nullptr_t type.