code fixed
@@ -856,8 +856,6 @@ ConfigCategory::CategoryItem::CategoryItem(const string& name,
if (item.HasMember("value") &&
(item["value"].IsObject() || m_typeUpperCase.compare("JSON") == 0))
- {
- if (m_typeUpperCase.compare("JSON") == 0)
{
rapidjson::StringBuffer strbuf;
rapidjson::Writer<rapidjson::StringBuffer> writer(strbuf);
@@ -882,6 +880,8 @@ ConfigCategory::CategoryItem::CategoryItem(const string& name,
throw new runtime_error("'value' JSON property is not an object");
}
}
+ if (m_typeUpperCase.compare("JSON") == 0)
+ {
m_itemType = JsonItem;
}
else
@@ -942,8 +942,6 @@ ConfigCategory::CategoryItem::CategoryItem(const string& name,
// Item "default" can be an escaped JSON string, so check m_type JSON as well
if (item.HasMember("default") &&
(item["default"].IsObject() || m_typeUpperCase.compare("JSON") == 0))
- {
- if (m_typeUpperCase.compare("JSON") == 0)
{
rapidjson::StringBuffer strbuf;
rapidjson::Writer<rapidjson::StringBuffer> writer(strbuf);
@@ -968,6 +966,9 @@ ConfigCategory::CategoryItem::CategoryItem(const string& name,
throw new runtime_error("'default' JSON property is not an object");
}
}
+ if (m_typeUpperCase.compare("JSON") == 0)
+ {
+
m_itemType = JsonItem;
}
else
