aboutsummaryrefslogtreecommitdiff
path: root/src/jsonable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsonable.h')
-rw-r--r--src/jsonable.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsonable.h b/src/jsonable.h
index d6866b8..2c0da6b 100644
--- a/src/jsonable.h
+++ b/src/jsonable.h
@@ -19,7 +19,8 @@ template<typename T> std::vector<T> json2vec(const nlohmann::json& data) {
template<typename T> std::vector<T> jsonList2vec(const std::string& type, const std::vector<std::string>& names) {
std::vector<T> ret;
for(auto name : names) {
- ret.push_back(utils::loadJson(type, name));
+ auto j = utils::loadJson(type, name);
+ ret.push_back(T(j, j));
}
return ret;
}