comparison 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
comparison
equal deleted inserted replaced
2656:a6d3e45eeff5 2657:5eea2f11e8df
114 value[field.c_str()].type() != Json::arrayValue) 114 value[field.c_str()].type() != Json::arrayValue)
115 { 115 {
116 throw OrthancException(ErrorCode_BadFileFormat); 116 throw OrthancException(ErrorCode_BadFileFormat);
117 } 117 }
118 118
119 target.clear(); 119 const Json::Value& arr = value[field.c_str()];
120 target.resize(value.size()); 120
121 121 target.resize(arr.size());
122 const Json::Value arr = value[field.c_str()]; 122
123
124 for (Json::Value::ArrayIndex i = 0; i < arr.size(); i++) 123 for (Json::Value::ArrayIndex i = 0; i < arr.size(); i++)
125 { 124 {
126 if (arr[i].type() != Json::stringValue) 125 if (arr[i].type() != Json::stringValue)
127 { 126 {
128 throw OrthancException(ErrorCode_BadFileFormat); 127 throw OrthancException(ErrorCode_BadFileFormat);