Hi,
I am trying to use Json to serialize/de-serialize vector of json record. I am new at this JSON.
How do you serialize/de-serialize entire json vector into stream?
Thank You
utility::stringstream_t streamOutput;
std::vector<json::value> jsonVector;
for (int i = 0; i < updatelist.GetCount(); i++)
{
//TODO: How to Serialize jsonVector into text stream?
I am trying to use Json to serialize/de-serialize vector of json record. I am new at this JSON.
How do you serialize/de-serialize entire json vector into stream?
Thank You
Mike
Example:utility::stringstream_t streamOutput;
std::vector<json::value> jsonVector;
for (int i = 0; i < updatelist.GetCount(); i++)
{
FILETIME *ftFileModify;
SYSTEMTIME stUTC;
json::value jsonObj;
__int64 temp = updatelist[i].GetLastWriteTime();
ftFileModify = (FILETIME *)&temp;
FileTimeToSystemTime(ftFileModify, &stUTC);
jsonObj[L"wYear"] = json::value::number(stUTC.wYear);
jsonObj[L"wMonth"] = json::value::number(stUTC.wMonth);
jsonObj[L"wDayOfWeek"] = json::value::number(stUTC.wDayOfWeek);
jsonObj[L"wDay"] = json::value::number(stUTC.wDay);
jsonObj[L"wHour"] = json::value::number(stUTC.wHour);
jsonObj[L"wMinute"] = json::value::number(stUTC.wMinute);
jsonObj[L"wSecond"] = json::value::number(stUTC.wSecond);
jsonObj[L"wMilliseconds"] = json::value::number(stUTC.wMilliseconds);
jsonVector.push_back(jsonObj);
} //TODO: How to Serialize jsonVector into text stream?