mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Add support for serializing empty Variants.
This commit is contained in:
parent
d0b2335abb
commit
bd8e0a9001
@ -96,6 +96,8 @@ cJSON *Variant::ToJson(void) const
|
|||||||
Logger::Write(LogDebug, "base", "Ignoring unknown object while converting variant to JSON.");
|
Logger::Write(LogDebug, "base", "Ignoring unknown object while converting variant to JSON.");
|
||||||
return cJSON_CreateNull();
|
return cJSON_CreateNull();
|
||||||
}
|
}
|
||||||
|
} else if (m_Value.type() == typeid(boost::blank)) {
|
||||||
|
return cJSON_CreateNull();
|
||||||
} else {
|
} else {
|
||||||
throw runtime_error("Invalid variant type.");
|
throw runtime_error("Invalid variant type.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user