资源简介
jsoncpp源码是从git上面克隆下来 克隆地址:https://github.com/open-source-parsers/jsoncpp
克隆时的版本为 1.8.4

代码片段和文件信息
“““Amalgamate json-cpp library sources into a single source and header file.
Works with python2.6+ and python3.4+.
Example of invocation (must be invoked from json-cpp top directory):
python amalgamate.py
“““
import os
import os.path
import sys
class AmalgamationFile:
def __init__(self top_dir):
self.top_dir = top_dir
self.blocks = []
def add_text(self text):
if not text.endswith(“\n“):
text += “\n“
self.blocks.append(text)
def add_file(self relative_input_path wrap_in_comment=False):
def add_marker(prefix):
self.add_text(““)
self.add_text(“// “ + “/“*70)
self.add_text(“// %s of content of file: %s“ % (prefix relative_input_path.replace(“\\““/“)))
self.add_text(“// “ + “/“*70)
self.add_text(““)
add_marker(“Beginning“)
f = open(os.path.join(self.top_dir relative_input_path) “rt“)
content = f.read()
if wrap_in_comment:
content = “/*\n“ + content + “\n*/“
self.add_text(content)
f.close()
add_marker(“End“)
self.add_text(“\n\n\n\n“)
def get_value(self):
return ““.join(self.blocks).replace(“\r\n““\n“)
def write_to(self output_path):
output_dir = os.path.dirname(output_path)
if output_dir and not os.path.isdir(output_dir):
os.makedirs(output_dir)
f = open(output_path “wb“)
f.write(str.encode(self.get_value() ‘UTF-8‘))
f.close()
def amalgamate_source(source_top_dir=None
target_source_path=None
header_include_path=None):
“““Produces amalgamated source.
Parameters:
source_top_dir: top-directory
target_source_path: output .cpp path
header_include_path: generated header path relative to target_source_path.
“““
print(“Amalgamating header...“)
header = AmalgamationFile(source_top_dir)
header.add_text(“/// Json-cpp amalgamated header (http://jsoncpp.sourceforge.net/).“)
header.add_text(‘/// It is intended to be used with #include “%s“‘ % header_include_path)
header.add_file(“LICENSE“ wrap_in_comment=True)
header.add_text(“#ifndef JSON_AMALGAMATED_H_INCLUDED“)
header.add_text(“# define JSON_AMALGAMATED_H_INCLUDED“)
header.add_text(“/// If defined indicates that the source file is amalgamated“)
header.add_text(“/// to prevent private header inclusion.“)
header.add_text(“#define JSON_IS_AMALGAMATION“)
header.add_file(“include/json/version.h“)
#header.add_file(“include/json/allocator.h“) # Not available here.
header.add_file(“include/json/config.h“)
header.add_file(“include/json/forwards.h“)
header.add_file(“include/json/features.h“)
header.add_file(“include/json/value.h“)
header.add_file(“include/json/reader.h“)
header.add_file(“include/json/writer.h“)
header.add_file(“include/json/assertions.h“)
header.add
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-12-04 04:20 jsoncpp-master\
文件 1396 2018-12-04 04:20 jsoncpp-master\.clang-format
文件 221 2018-12-04 04:20 jsoncpp-master\.gitattributes
文件 708 2018-12-04 04:20 jsoncpp-master\.gitignore
文件 1074 2018-12-04 04:20 jsoncpp-master\.travis.yml
文件 4032 2018-12-04 04:20 jsoncpp-master\AUTHORS
文件 6056 2018-12-04 04:20 jsoncpp-master\CMakeLists.txt
文件 2723 2018-12-04 04:20 jsoncpp-master\LICENSE
文件 6015 2018-12-04 04:20 jsoncpp-master\README.md
文件 6855 2018-12-04 04:20 jsoncpp-master\amalgamate.py
文件 654 2018-12-04 04:20 jsoncpp-master\appveyor.yml
文件 1072 2018-12-04 04:20 jsoncpp-master\dev.makefile
目录 0 2018-12-04 04:20 jsoncpp-master\devtools\
文件 250 2018-12-04 04:20 jsoncpp-master\devtools\__init__.py
文件 898 2018-12-04 04:20 jsoncpp-master\devtools\agent_vmw7.json
文件 589 2018-12-04 04:20 jsoncpp-master\devtools\agent_vmxp.json
文件 7908 2018-12-04 04:20 jsoncpp-master\devtools\antglob.py
文件 11483 2018-12-04 04:20 jsoncpp-master\devtools\batchbuild.py
文件 2226 2018-12-04 04:20 jsoncpp-master\devtools\fixeol.py
文件 3964 2018-12-04 04:20 jsoncpp-master\devtools\licenseupdater.py
文件 2234 2018-12-04 04:20 jsoncpp-master\devtools\tarball.py
目录 0 2018-12-04 04:20 jsoncpp-master\doc\
文件 100514 2018-12-04 04:20 jsoncpp-master\doc\doxyfile.in
文件 716 2018-12-04 04:20 jsoncpp-master\doc\footer.html
文件 1975 2018-12-04 04:20 jsoncpp-master\doc\header.html
文件 5866 2018-12-04 04:20 jsoncpp-master\doc\jsoncpp.dox
文件 71 2018-12-04 04:20 jsoncpp-master\doc\readme.txt
文件 109 2018-12-04 04:20 jsoncpp-master\doc\roadmap.dox
文件 100095 2018-12-04 04:20 jsoncpp-master\doc\web_doxyfile.in
文件 7416 2018-12-04 04:20 jsoncpp-master\doxybuild.py
目录 0 2018-12-04 04:20 jsoncpp-master\include\
............此处省略215个文件信息
- 上一篇:hd7279资源hd7279中文资料
- 下一篇:全自动学生评语,老师的好助手
相关资源
- Notepad++ 32位 jsonview插件
- notepad++ json格式化插件
- Jsonviewer2 for Notepad++ 64 bit
-
Notepad++xm
l格式化插件和json格式化插 -
Volley获取json和xm
l数据解析显示 - eCharts全国及各省、市、县地图层jso
- 编译好的json_lib.lib 包含64位,32位,头
- json格式化工具.zip
- 易语言JSON解析模块2.0源码
- echart地图 34省js及json文件 344地级js
- 全国各省市地json图
- 宁夏省市地图js和json文件
- echarts生成json地图最新版
- 中国国界和省界的GeoJson格式数据
- 中国地图_GeoJson文件
- 全国市级地图json文件
- echart 全国/各省份以及各地级市JSON文
- Echarts省市级地图js,json数据
- 全国各省、市、区json的Echarts地图
- 2018行政区划数据_省市区街居_五级_
- Json.net
- Notepad++的Json格式化插件win32和x64两版
- json获取datatable后生成table分页显示c
- 实现yarnlock与packagelockjson相互转换
- advanced rest client definitions.json
- 复杂的json字符串解析真实案例
- .net2.0中生成和解析JSON
- 2018年5月更新最新全国省市区县geojs
- echarts全国省市地图js、json数据
- Newtonsoft.json.dll v4.5.11
评论
共有 条评论