You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I have realized that when
skipEmptyFields
is true, there is no way to outputnull
into the JSON. A possible solution for this very niche use case would be to add aNullType
class that would be used forstd::nullptr_t
and would always serialize asnull
and when parsed, it would just throwTYPE_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.The text was updated successfully, but these errors were encountered: