mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +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.");
|
||||
return cJSON_CreateNull();
|
||||
}
|
||||
} else if (m_Value.type() == typeid(boost::blank)) {
|
||||
return cJSON_CreateNull();
|
||||
} else {
|
||||
throw runtime_error("Invalid variant type.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user