JSON Spirit 介绍
JSON Spirit 是一个 C++ 的 JSON 解析器和生成器,使用 Boost Spirit 实现。
示例代码:
istringstream is( "[1][1,2][1,2,3]" ); // no white space separating arrays Stream_reader< istringstream, Value > reader( is ); Value value; const bool ok = reader.read_next( value ); // read first array reader.read_next( value ); // read second array reader.read_next( value ); // read third array
JSON Spirit 官网
http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented