|
@@ -85,7 +85,7 @@ namespace robotics {
|
|
|
else if (rttr::type::get<std::vector<std::int64_t>>() == property.get_type()) {
|
|
|
result[prop_name] = property.get_value(value).get_value<std::vector<std::int64_t>>();
|
|
|
}
|
|
|
- else if (rttr::type::get<int>() == property.get_type()) {
|
|
|
+ else if (rttr::type::get<std::vector<std::string>>() == property.get_type()) {
|
|
|
result[prop_name] = property.get_value(value).get_value<std::vector<std::string>>();
|
|
|
}
|
|
|
else if (rttr::type::get<std::vector<v3::datetime>>() == property.get_type()) {
|
|
@@ -456,6 +456,19 @@ namespace robotics {
|
|
|
deserialize(json, ret);
|
|
|
return result;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @brief 反序列化
|
|
|
+ * @tparam _Ret
|
|
|
+ * @param value
|
|
|
+ * @param result
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ template<>
|
|
|
+ static rttr::variant deserialize<rttr::variant>(std::string const& value, rttr::variant& result) {
|
|
|
+ nlohmann::json json = nlohmann::json::parse(value);
|
|
|
+ deserialize(json, result);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
/**
|
|
|
* @brief 反序列化
|
|
|
* @tparam _Ret
|