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'm working on my first CPP project and admittedly inexperienced templating or concepts like SFINAE. If anyone has a possible solution or point out where I'm going wrong it would appreciated. Thank you!
Describe which system (OS, compiler) you are using
Linux 5.6.6 x86-64, clang 10.0.0
Describe which version of the library you are using (release version, develop branch)
develop branch
The text was updated successfully, but these errors were encountered:
No, this is currently not possible without changing the code of the original serializer, see include/nlohmann/detail/output/serializer.hpp, function dump_escaped.
Describe what you want to achieve
I would like to be able to override the default string serialization to return a
null
value for empty strings. For instance,source
output
Describe what you tried
void to_json(nlohmann::json &j, const std::string &s)
. Redefinition error while linking.to_json
, for example,source
output
I'm working on my first CPP project and admittedly inexperienced templating or concepts like SFINAE. If anyone has a possible solution or point out where I'm going wrong it would appreciated. Thank you!
Describe which system (OS, compiler) you are using
Linux 5.6.6 x86-64, clang 10.0.0
Describe which version of the library you are using (release version, develop branch)
develop
branchThe text was updated successfully, but these errors were encountered: