void className::write(*data)
{
Json::Value Element1;
Json::Value Element2;
QFile file("test.json");
if(!file.open(QFile::WriteOnly|QFile::Truncate))
return;
//处理数据
Element2["Name"] = HCommon::unicode2Json(data->name);
Element2["age"] = HCommon::unicode2Json(user->age);
Element1[0] = Element2;
Element1[1] = Element2;
QTextStream streamOut(&file);
streamOut << QString::fromStdString(jsonRoot.toStyledString());
file.close();
}