Ai
3 Star 35 Fork 13

Cheedoong/xml2json

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xml2json.cpp 549 Bytes
一键复制 编辑 原始数据 按行查看 历史
Cheedoong 提交于 2015-03-09 23:34 +08:00 . 1. update to the latest version of rapidjson;
#include <iostream>
#include <sstream>
#include <fstream>
#include "xml2json.hpp"
using namespace std;
auto convert( const istream &input ) -> void
{
ostringstream oss;
oss << input.rdbuf();
const auto json_str = xml2json( oss.str().data() );
cout << json_str << endl;
}
auto main( const int argc, const char *const argv[] ) -> int
{
switch ( argc ) {
case 1: convert( cin );
break;
case 2: convert( ifstream( argv[1] ));
break;
default: exit( EXIT_FAILURE );
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JSON工具
1
https://gitee.com/cheedoong/xml2json.git
git@gitee.com:cheedoong/xml2json.git
cheedoong
xml2json
xml2json
master

搜索帮助