前端之家收集整理的这篇文章主要介绍了
jsoncpp下载和使用,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
最新jsoncpp源码下载地址:
https://github.com/open-source-parsers/jsoncpp
打开version文件可以看到当前版本号。目前最新版本为0.7.0
README.md 说明了如何进行编译。其中:
Generating amalgamated source and header
JsonCpp is provided with a script to generate a single header and a single source file to ease inclusion into an existing project. The amalgamated source can be generated at any time by running the following command from the top-directory (this requires Python 2.6):
python amalgamate.py
It is possible to specify header name. See the -h
option for detail.
By default,the following files are generated:
dist/jsoncpp.cpp
: source file that needs to be added to your project.
dist/json/json.h
: corresponding header file for use in your project. It is equivalent to includingjson/json.h
in non-amalgamated source. This header only depends on standard headers.
dist/json/json-forwards.h
: header that provides forward declaration of all JsonCpp types.
The amalgamated sources are generated by concatenating JsonCpp source in the correct order and defining the macroJSON_IS_AMALGAMATION
to prevent inclusion of other headers.
以上生成的源码文件,可以应用到我们的项目中(这也是jsoncpp建议使用的方法),非常方便。
原文链接:https://www.f2er.com/json/290023.html