使用rapidjson输出json文件

前端之家收集整理的这篇文章主要介绍了使用rapidjson输出json文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
rapidjson::Value geo(rapidjson::kObjectType);
            insertKeyValue(geo,"type","LineString",allocator);
 
            QPointF p1 = pos.gta_to_wgs84(QPointF(road.Node1.PositionX,road.Node1.PositionY));
            rapidjson::Value xyz1(rapidjson::kArrayType);
            xyz1.PushBack(p1.x(),allocator);
            xyz1.PushBack(p1.y(),allocator);
            xyz1.PushBack(road.Node1.PositionZ,allocator);
 
            QPointF p2 = pos.gta_to_wgs84(QPointF(road.Node2.PositionX,road.Node2.PositionY));
            rapidjson::Value xyz2(rapidjson::kArrayType);
            xyz2.PushBack(p2.x(),allocator);
            xyz2.PushBack(p2.y(),allocator);
            xyz2.PushBack(road.Node2.PositionZ,allocator);
 
            rapidjson::Value xyzs(rapidjson::kArrayType);
            xyzs.PushBack(xyz1,allocator);
            xyzs.PushBack(xyz2,allocator);
            geo.AddMember(rapidjson::StringRef("coordinates"),xyzs,allocator);使用系统工具查看md5certutil -hashfile pathdata_node51.json MD5

猜你在找的Json相关文章