Skip to content
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

Support nullptr_t #39

Open
Chlumsky opened this issue Mar 26, 2023 · 0 comments
Open

Support nullptr_t #39

Chlumsky opened this issue Mar 26, 2023 · 0 comments
Labels
code-generation Involves generation of parser / serializer code minor A minor issue

Comments

@Chlumsky
Copy link
Owner

I have realized that when skipEmptyFields is true, there is no way to output null into the JSON. A possible solution for this very niche use case would be to add a NullType class that would be used for std::nullptr_t and would always serialize as null and when parsed, it would just throw TYPE_MISMATCH if 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.

@Chlumsky Chlumsky added minor A minor issue code-generation Involves generation of parser / serializer code labels Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation Involves generation of parser / serializer code minor A minor issue
Projects
None yet
Development

No branches or pull requests

1 participant