Merge branch 'develop' into json-parsing

This commit is contained in:
Frank Dana
2020-01-20 15:25:40 -05:00
committed by GitHub
35 changed files with 966 additions and 344 deletions

View File

@@ -108,9 +108,8 @@ void ReaderBase::DisplayInfo() {
std::cout << "----------------------------" << std::endl;
// Iterate through metadata
std::map<std::string, std::string>::iterator it;
for (it = info.metadata.begin(); it != info.metadata.end(); it++)
std::cout << "--> " << it->first << ": " << it->second << std::endl;
for (auto it : info.metadata)
std::cout << "--> " << it.first << ": " << it.second << std::endl;
}
// Generate Json::Value for this object
@@ -160,9 +159,9 @@ Json::Value ReaderBase::JsonValue() const {
// Append metadata map
root["metadata"] = Json::Value(Json::objectValue);
std::map<std::string, std::string>::const_iterator it;
for (it = info.metadata.begin(); it != info.metadata.end(); it++)
root["metadata"][it->first] = it->second;
for (const auto it : info.metadata)
root["metadata"][it.first] = it.second;
// return JsonValue
return root;