detail::IterateOver::set_null = [&] (const std::string& name)
{
if constexpr (debug)
{
std::cout
<< "struct_mapping: map_struct_to_json.set_null: "
<< name
<< std::endl;
}
if (!hide_null)
{
if (!first_element)
{
json_data << ",";
}
if (!indent.empty())
{
json_data << "\n";
}
for (unsigned i = indent_count; i != 0; --i)
{
json_data << indent;
}
if (name.empty())
{
json_data << "null";
}
else
{
json_data << "\"" << name << "\":";
if (!indent.empty())
{
json_data << " ";
}
json_data << "null";
}
first_element = false;
}
//first_element = false;
};