blob: a32ae1eb5553f6bc66219d62b9e804a09ab63680 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "XInternal.h"
json vagt::encode::mergeCommonValues(json jsonObj, const std::map<std::string, XCommonValue>& values)
{
for (auto it : values)
{
if (XDataTypeInteger == it.second.dataType_)
{
jsonObj[it.first] = it.second.intVal_;
}
else if (XDataTypeNumber == it.second.dataType_)
{
jsonObj[it.first] = it.second.numberVal_;
}
else if (XDataTypeString == it.second.dataType_)
{
jsonObj[it.first] = it.second.strVal_;
}
}
return jsonObj;
}
|