Mercurial > hg > orthanc
diff Core/SerializationToolbox.cpp @ 2657:5eea2f11e8df jobs
JobsSerialization.GenericJobs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 06 Jun 2018 16:52:42 +0200 |
parents | a6d3e45eeff5 |
children | 47d812308d63 |
line wrap: on
line diff
--- a/Core/SerializationToolbox.cpp Tue Jun 05 18:25:23 2018 +0200 +++ b/Core/SerializationToolbox.cpp Wed Jun 06 16:52:42 2018 +0200 @@ -116,11 +116,10 @@ throw OrthancException(ErrorCode_BadFileFormat); } - target.clear(); - target.resize(value.size()); + const Json::Value& arr = value[field.c_str()]; - const Json::Value arr = value[field.c_str()]; - + target.resize(arr.size()); + for (Json::Value::ArrayIndex i = 0; i < arr.size(); i++) { if (arr[i].type() != Json::stringValue)