Fix exception in Value::ToJson().

Refs #5049
This commit is contained in:
Gunnar Beutner 2013-11-11 09:27:01 +01:00
parent eb746b9929
commit 893243db5f
1 changed files with 1 additions and 3 deletions

View File

@ -174,10 +174,8 @@ cJSON *Value::ToJson(void) const
} else if (IsObjectType<Array>()) { } else if (IsObjectType<Array>()) {
Array::Ptr array = *this; Array::Ptr array = *this;
return array->ToJson(); return array->ToJson();
} else if (IsEmpty()) {
return cJSON_CreateNull();
} else { } else {
BOOST_THROW_EXCEPTION(std::runtime_error("Unknown object type.")); return cJSON_CreateNull();
} }
case ValueEmpty: case ValueEmpty: