@eosrio/node-abieos 2.1.0-beta.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/abieos.node +0 -0
- package/lib/abieos.d.ts +19 -0
- package/lib/abieos.d.ts.map +1 -0
- package/lib/abieos.js +100 -0
- package/lib/abieos.ts +107 -0
- package/package.json +13 -8
- package/.gitmodules +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/node-abieos.iml +0 -12
- package/.idea/vcs.xml +0 -9
- package/.idea/workspace.xml +0 -266
- package/CMakeLists.txt +0 -35
- package/abieos.d.ts +0 -21
- package/abieos.js +0 -59
- package/eosio.json +0 -1596
- package/external/date/CMakeLists.txt +0 -175
- package/external/date/LICENSE.txt +0 -31
- package/external/date/README.md +0 -61
- package/external/date/compile_fail.sh +0 -16
- package/external/date/include/date/chrono_io.h +0 -34
- package/external/date/include/date/date.h +0 -8335
- package/external/date/include/date/ios.h +0 -50
- package/external/date/include/date/islamic.h +0 -3031
- package/external/date/include/date/iso_week.h +0 -1745
- package/external/date/include/date/julian.h +0 -3046
- package/external/date/include/date/ptz.h +0 -592
- package/external/date/include/date/tz.h +0 -2760
- package/external/date/include/date/tz_private.h +0 -318
- package/external/date/src/ios.mm +0 -337
- package/external/date/src/tz.cpp +0 -3801
- package/external/date/test/clock_cast_test/custom_clock.pass.cpp +0 -213
- package/external/date/test/clock_cast_test/deprecated.pass.cpp +0 -90
- package/external/date/test/clock_cast_test/local_t.pass.cpp +0 -132
- package/external/date/test/clock_cast_test/noncastable.pass.cpp +0 -251
- package/external/date/test/clock_cast_test/normal_clocks.pass.cpp +0 -102
- package/external/date/test/clock_cast_test/to_sys_return_int.fail.cpp +0 -49
- package/external/date/test/clock_cast_test/to_sys_return_reference.fail.cpp +0 -51
- package/external/date/test/clock_cast_test/to_sys_return_utc_time.fail.cpp +0 -49
- package/external/date/test/date_test/day.pass.cpp +0 -143
- package/external/date/test/date_test/daypday.fail.cpp +0 -32
- package/external/date/test/date_test/daysmday.fail.cpp +0 -32
- package/external/date/test/date_test/daysmweekday.fail.cpp +0 -32
- package/external/date/test/date_test/detail/decimal_format_seconds.pass.cpp +0 -145
- package/external/date/test/date_test/detail/make_precision.pass.cpp +0 -63
- package/external/date/test/date_test/detail/static_pow10.pass.cpp +0 -50
- package/external/date/test/date_test/detail/width.pass.cpp +0 -64
- package/external/date/test/date_test/durations.pass.cpp +0 -62
- package/external/date/test/date_test/durations_output.pass.cpp +0 -328
- package/external/date/test/date_test/format/century.pass.cpp +0 -117
- package/external/date/test/date_test/format/misc.pass.cpp +0 -52
- package/external/date/test/date_test/format/range.pass.cpp +0 -78
- package/external/date/test/date_test/format/two_dight_year.pass.cpp +0 -121
- package/external/date/test/date_test/last.pass.cpp +0 -34
- package/external/date/test/date_test/make_time.pass.cpp +0 -164
- package/external/date/test/date_test/month.pass.cpp +0 -181
- package/external/date/test/date_test/month_day.pass.cpp +0 -82
- package/external/date/test/date_test/month_day_last.pass.cpp +0 -75
- package/external/date/test/date_test/month_weekday.pass.cpp +0 -77
- package/external/date/test/date_test/month_weekday_last.pass.cpp +0 -77
- package/external/date/test/date_test/month_weekday_last_less.fail.cpp +0 -34
- package/external/date/test/date_test/month_weekday_less.fail.cpp +0 -34
- package/external/date/test/date_test/monthpmonth.fail.cpp +0 -32
- package/external/date/test/date_test/months_m_year_month.fail.cpp +0 -33
- package/external/date/test/date_test/months_m_year_month_day.fail.cpp +0 -33
- package/external/date/test/date_test/monthsmmonth.fail.cpp +0 -32
- package/external/date/test/date_test/multi_year_duration_addition.pass.cpp +0 -297
- package/external/date/test/date_test/op_div_day_day.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_int_month.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_int_year.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_last_last.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_month_day.pass.cpp +0 -41
- package/external/date/test/date_test/op_div_month_day_last.pass.cpp +0 -39
- package/external/date/test/date_test/op_div_month_day_month_day.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_month_month.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_month_weekday.pass.cpp +0 -39
- package/external/date/test/date_test/op_div_month_weekday_last.pass.cpp +0 -39
- package/external/date/test/date_test/op_div_month_year.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_survey.pass.cpp +0 -437
- package/external/date/test/date_test/op_div_weekday_indexed_weekday_indexed.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_weekday_last_weekday_last.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_year_month.pass.cpp +0 -35
- package/external/date/test/date_test/op_div_year_month_day.pass.cpp +0 -43
- package/external/date/test/date_test/op_div_year_month_day_last.pass.cpp +0 -41
- package/external/date/test/date_test/op_div_year_month_weekday.pass.cpp +0 -41
- package/external/date/test/date_test/op_div_year_month_weekday_last.pass.cpp +0 -41
- package/external/date/test/date_test/op_div_year_month_year_month.fail.cpp +0 -33
- package/external/date/test/date_test/op_div_year_year.fail.cpp +0 -33
- package/external/date/test/date_test/parse.pass.cpp +0 -904
- package/external/date/test/date_test/sizeof.pass.cpp +0 -62
- package/external/date/test/date_test/time_of_day_hours.pass.cpp +0 -104
- package/external/date/test/date_test/time_of_day_microfortnights.pass.cpp +0 -119
- package/external/date/test/date_test/time_of_day_milliseconds.pass.cpp +0 -126
- package/external/date/test/date_test/time_of_day_minutes.pass.cpp +0 -110
- package/external/date/test/date_test/time_of_day_nanoseconds.pass.cpp +0 -126
- package/external/date/test/date_test/time_of_day_seconds.pass.cpp +0 -116
- package/external/date/test/date_test/weekday.pass.cpp +0 -201
- package/external/date/test/date_test/weekday_indexed.pass.cpp +0 -70
- package/external/date/test/date_test/weekday_last.pass.cpp +0 -66
- package/external/date/test/date_test/weekday_lessthan.fail.cpp +0 -32
- package/external/date/test/date_test/weekday_sum.fail.cpp +0 -32
- package/external/date/test/date_test/year.pass.cpp +0 -146
- package/external/date/test/date_test/year_month.pass.cpp +0 -142
- package/external/date/test/date_test/year_month_day.pass.cpp +0 -244
- package/external/date/test/date_test/year_month_day_last.pass.cpp +0 -177
- package/external/date/test/date_test/year_month_day_m_year_month_day.fail.cpp +0 -33
- package/external/date/test/date_test/year_month_day_p_year_month_day.fail.cpp +0 -33
- package/external/date/test/date_test/year_month_p_year_month.fail.cpp +0 -33
- package/external/date/test/date_test/year_month_weekday.pass.cpp +0 -178
- package/external/date/test/date_test/year_month_weekday_last.pass.cpp +0 -169
- package/external/date/test/date_test/year_p_year.fail.cpp +0 -32
- package/external/date/test/date_test/years_m_year.fail.cpp +0 -32
- package/external/date/test/date_test/years_m_year_month.fail.cpp +0 -33
- package/external/date/test/date_test/years_m_year_month_day.fail.cpp +0 -33
- package/external/date/test/iso_week/last.pass.cpp +0 -34
- package/external/date/test/iso_week/lastweek_weekday.pass.cpp +0 -82
- package/external/date/test/iso_week/op_div_survey.pass.cpp +0 -196
- package/external/date/test/iso_week/weekday.pass.cpp +0 -227
- package/external/date/test/iso_week/weekday_lessthan.fail.cpp +0 -32
- package/external/date/test/iso_week/weekday_sum.fail.cpp +0 -32
- package/external/date/test/iso_week/weeknum.pass.cpp +0 -121
- package/external/date/test/iso_week/weeknum_p_weeknum.fail.cpp +0 -32
- package/external/date/test/iso_week/weeknum_weekday.pass.cpp +0 -86
- package/external/date/test/iso_week/year.pass.cpp +0 -120
- package/external/date/test/iso_week/year_lastweek.pass.cpp +0 -97
- package/external/date/test/iso_week/year_lastweek_weekday.pass.cpp +0 -129
- package/external/date/test/iso_week/year_p_year.fail.cpp +0 -32
- package/external/date/test/iso_week/year_weeknum.pass.cpp +0 -97
- package/external/date/test/iso_week/year_weeknum_weekday.pass.cpp +0 -139
- package/external/date/test/iso_week/years_m_year.fail.cpp +0 -32
- package/external/date/test/just.pass.cpp +0 -26
- package/external/date/test/testit +0 -177
- package/external/date/test/tz_test/OffsetZone.pass.cpp +0 -81
- package/external/date/test/tz_test/README.md +0 -22
- package/external/date/test/tz_test/tzdata2015e.txt.zip +0 -0
- package/external/date/test/tz_test/tzdata2015f.txt.zip +0 -0
- package/external/date/test/tz_test/tzdata2016c.txt.zip +0 -0
- package/external/date/test/tz_test/tzdata2016d.txt.zip +0 -0
- package/external/date/test/tz_test/tzdata2016e.txt.zip +0 -0
- package/external/date/test/tz_test/tzdata2016f.txt.zip +0 -0
- package/external/date/test/tz_test/validate.cpp +0 -165
- package/external/date/test/tz_test/zone.pass.cpp +0 -37
- package/external/date/test/tz_test/zoned_time.pass.cpp +0 -464
- package/external/date/test_fail.sh +0 -10
- package/external/rapidjson/.gitattributes +0 -22
- package/external/rapidjson/.gitmodules +0 -3
- package/external/rapidjson/.travis.yml +0 -99
- package/external/rapidjson/CHANGELOG.md +0 -158
- package/external/rapidjson/CMakeLists.txt +0 -221
- package/external/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
- package/external/rapidjson/RapidJSON.pc.in +0 -7
- package/external/rapidjson/RapidJSONConfig.cmake.in +0 -15
- package/external/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
- package/external/rapidjson/appveyor.yml +0 -54
- package/external/rapidjson/bin/data/glossary.json +0 -22
- package/external/rapidjson/bin/data/menu.json +0 -27
- package/external/rapidjson/bin/data/readme.txt +0 -1
- package/external/rapidjson/bin/data/sample.json +0 -3315
- package/external/rapidjson/bin/data/webapp.json +0 -88
- package/external/rapidjson/bin/data/widget.json +0 -26
- package/external/rapidjson/bin/encodings/utf16be.json +0 -0
- package/external/rapidjson/bin/encodings/utf16bebom.json +0 -0
- package/external/rapidjson/bin/encodings/utf16le.json +0 -0
- package/external/rapidjson/bin/encodings/utf16lebom.json +0 -0
- package/external/rapidjson/bin/encodings/utf32be.json +0 -0
- package/external/rapidjson/bin/encodings/utf32bebom.json +0 -0
- package/external/rapidjson/bin/encodings/utf32le.json +0 -0
- package/external/rapidjson/bin/encodings/utf32lebom.json +0 -0
- package/external/rapidjson/bin/encodings/utf8.json +0 -7
- package/external/rapidjson/bin/encodings/utf8bom.json +0 -7
- package/external/rapidjson/bin/jsonchecker/fail1.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail10.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail11.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail12.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail13.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail14.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail15.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail16.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail17.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail18.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail19.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail2.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail20.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail21.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail22.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail23.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail24.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail25.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail26.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail27.json +0 -2
- package/external/rapidjson/bin/jsonchecker/fail28.json +0 -2
- package/external/rapidjson/bin/jsonchecker/fail29.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail3.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail30.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail31.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail32.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail33.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail4.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail5.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail6.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail7.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail8.json +0 -1
- package/external/rapidjson/bin/jsonchecker/fail9.json +0 -1
- package/external/rapidjson/bin/jsonchecker/pass1.json +0 -58
- package/external/rapidjson/bin/jsonchecker/pass2.json +0 -1
- package/external/rapidjson/bin/jsonchecker/pass3.json +0 -6
- package/external/rapidjson/bin/jsonchecker/readme.txt +0 -3
- package/external/rapidjson/bin/types/booleans.json +0 -102
- package/external/rapidjson/bin/types/floats.json +0 -102
- package/external/rapidjson/bin/types/guids.json +0 -102
- package/external/rapidjson/bin/types/integers.json +0 -102
- package/external/rapidjson/bin/types/mixed.json +0 -592
- package/external/rapidjson/bin/types/nulls.json +0 -102
- package/external/rapidjson/bin/types/paragraphs.json +0 -102
- package/external/rapidjson/bin/types/readme.txt +0 -1
- package/external/rapidjson/contrib/natvis/LICENSE +0 -45
- package/external/rapidjson/contrib/natvis/README.md +0 -7
- package/external/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
- package/external/rapidjson/doc/CMakeLists.txt +0 -27
- package/external/rapidjson/doc/Doxyfile.in +0 -2369
- package/external/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
- package/external/rapidjson/doc/diagram/architecture.dot +0 -50
- package/external/rapidjson/doc/diagram/architecture.png +0 -0
- package/external/rapidjson/doc/diagram/insituparsing.dot +0 -65
- package/external/rapidjson/doc/diagram/insituparsing.png +0 -0
- package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
- package/external/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
- package/external/rapidjson/doc/diagram/move1.dot +0 -47
- package/external/rapidjson/doc/diagram/move1.png +0 -0
- package/external/rapidjson/doc/diagram/move2.dot +0 -62
- package/external/rapidjson/doc/diagram/move2.png +0 -0
- package/external/rapidjson/doc/diagram/move3.dot +0 -60
- package/external/rapidjson/doc/diagram/move3.png +0 -0
- package/external/rapidjson/doc/diagram/normalparsing.dot +0 -56
- package/external/rapidjson/doc/diagram/normalparsing.png +0 -0
- package/external/rapidjson/doc/diagram/simpledom.dot +0 -54
- package/external/rapidjson/doc/diagram/simpledom.png +0 -0
- package/external/rapidjson/doc/diagram/tutorial.dot +0 -58
- package/external/rapidjson/doc/diagram/tutorial.png +0 -0
- package/external/rapidjson/doc/diagram/utilityclass.dot +0 -73
- package/external/rapidjson/doc/diagram/utilityclass.png +0 -0
- package/external/rapidjson/doc/dom.md +0 -280
- package/external/rapidjson/doc/dom.zh-cn.md +0 -284
- package/external/rapidjson/doc/encoding.md +0 -146
- package/external/rapidjson/doc/encoding.zh-cn.md +0 -152
- package/external/rapidjson/doc/faq.md +0 -289
- package/external/rapidjson/doc/faq.zh-cn.md +0 -290
- package/external/rapidjson/doc/features.md +0 -104
- package/external/rapidjson/doc/features.zh-cn.md +0 -103
- package/external/rapidjson/doc/internals.md +0 -368
- package/external/rapidjson/doc/internals.zh-cn.md +0 -363
- package/external/rapidjson/doc/logo/rapidjson.png +0 -0
- package/external/rapidjson/doc/logo/rapidjson.svg +0 -119
- package/external/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
- package/external/rapidjson/doc/misc/doxygenextra.css +0 -274
- package/external/rapidjson/doc/misc/footer.html +0 -11
- package/external/rapidjson/doc/misc/header.html +0 -24
- package/external/rapidjson/doc/npm.md +0 -31
- package/external/rapidjson/doc/performance.md +0 -26
- package/external/rapidjson/doc/performance.zh-cn.md +0 -26
- package/external/rapidjson/doc/pointer.md +0 -234
- package/external/rapidjson/doc/pointer.zh-cn.md +0 -234
- package/external/rapidjson/doc/sax.md +0 -509
- package/external/rapidjson/doc/sax.zh-cn.md +0 -487
- package/external/rapidjson/doc/schema.md +0 -505
- package/external/rapidjson/doc/schema.zh-cn.md +0 -237
- package/external/rapidjson/doc/stream.md +0 -429
- package/external/rapidjson/doc/stream.zh-cn.md +0 -429
- package/external/rapidjson/doc/tutorial.md +0 -536
- package/external/rapidjson/doc/tutorial.zh-cn.md +0 -535
- package/external/rapidjson/docker/debian/Dockerfile +0 -8
- package/external/rapidjson/example/CMakeLists.txt +0 -45
- package/external/rapidjson/example/archiver/archiver.cpp +0 -292
- package/external/rapidjson/example/archiver/archiver.h +0 -145
- package/external/rapidjson/example/archiver/archivertest.cpp +0 -287
- package/external/rapidjson/example/capitalize/capitalize.cpp +0 -67
- package/external/rapidjson/example/condense/condense.cpp +0 -32
- package/external/rapidjson/example/filterkey/filterkey.cpp +0 -135
- package/external/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
- package/external/rapidjson/example/jsonx/jsonx.cpp +0 -207
- package/external/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
- package/external/rapidjson/example/messagereader/messagereader.cpp +0 -105
- package/external/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
- package/external/rapidjson/example/pretty/pretty.cpp +0 -30
- package/external/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
- package/external/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
- package/external/rapidjson/example/serialize/serialize.cpp +0 -173
- package/external/rapidjson/example/simpledom/simpledom.cpp +0 -29
- package/external/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
- package/external/rapidjson/example/simplereader/simplereader.cpp +0 -42
- package/external/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
- package/external/rapidjson/example/tutorial/tutorial.cpp +0 -151
- package/external/rapidjson/include/rapidjson/allocators.h +0 -284
- package/external/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
- package/external/rapidjson/include/rapidjson/document.h +0 -2646
- package/external/rapidjson/include/rapidjson/encodedstream.h +0 -299
- package/external/rapidjson/include/rapidjson/encodings.h +0 -716
- package/external/rapidjson/include/rapidjson/error/en.h +0 -74
- package/external/rapidjson/include/rapidjson/error/error.h +0 -161
- package/external/rapidjson/include/rapidjson/filereadstream.h +0 -99
- package/external/rapidjson/include/rapidjson/filewritestream.h +0 -104
- package/external/rapidjson/include/rapidjson/fwd.h +0 -151
- package/external/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
- package/external/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
- package/external/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
- package/external/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
- package/external/rapidjson/include/rapidjson/internal/itoa.h +0 -308
- package/external/rapidjson/include/rapidjson/internal/meta.h +0 -186
- package/external/rapidjson/include/rapidjson/internal/pow10.h +0 -55
- package/external/rapidjson/include/rapidjson/internal/regex.h +0 -732
- package/external/rapidjson/include/rapidjson/internal/stack.h +0 -231
- package/external/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
- package/external/rapidjson/include/rapidjson/internal/strtod.h +0 -290
- package/external/rapidjson/include/rapidjson/internal/swap.h +0 -46
- package/external/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
- package/external/rapidjson/include/rapidjson/memorybuffer.h +0 -70
- package/external/rapidjson/include/rapidjson/memorystream.h +0 -71
- package/external/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
- package/external/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
- package/external/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
- package/external/rapidjson/include/rapidjson/pointer.h +0 -1357
- package/external/rapidjson/include/rapidjson/prettywriter.h +0 -277
- package/external/rapidjson/include/rapidjson/rapidjson.h +0 -654
- package/external/rapidjson/include/rapidjson/reader.h +0 -2230
- package/external/rapidjson/include/rapidjson/schema.h +0 -2494
- package/external/rapidjson/include/rapidjson/stream.h +0 -223
- package/external/rapidjson/include/rapidjson/stringbuffer.h +0 -121
- package/external/rapidjson/include/rapidjson/writer.h +0 -710
- package/external/rapidjson/include_dirs.js +0 -2
- package/external/rapidjson/library.json +0 -15
- package/external/rapidjson/license.txt +0 -57
- package/external/rapidjson/package.json +0 -24
- package/external/rapidjson/rapidjson.autopkg +0 -77
- package/external/rapidjson/readme.md +0 -160
- package/external/rapidjson/readme.zh-cn.md +0 -152
- package/external/rapidjson/test/CMakeLists.txt +0 -20
- package/external/rapidjson/test/perftest/CMakeLists.txt +0 -28
- package/external/rapidjson/test/perftest/misctest.cpp +0 -974
- package/external/rapidjson/test/perftest/perftest.cpp +0 -24
- package/external/rapidjson/test/perftest/perftest.h +0 -185
- package/external/rapidjson/test/perftest/platformtest.cpp +0 -166
- package/external/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
- package/external/rapidjson/test/perftest/schematest.cpp +0 -223
- package/external/rapidjson/test/unittest/CMakeLists.txt +0 -92
- package/external/rapidjson/test/unittest/allocatorstest.cpp +0 -100
- package/external/rapidjson/test/unittest/bigintegertest.cpp +0 -138
- package/external/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
- package/external/rapidjson/test/unittest/documenttest.cpp +0 -672
- package/external/rapidjson/test/unittest/dtoatest.cpp +0 -98
- package/external/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
- package/external/rapidjson/test/unittest/encodingstest.cpp +0 -451
- package/external/rapidjson/test/unittest/filestreamtest.cpp +0 -112
- package/external/rapidjson/test/unittest/fwdtest.cpp +0 -230
- package/external/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
- package/external/rapidjson/test/unittest/itoatest.cpp +0 -160
- package/external/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
- package/external/rapidjson/test/unittest/namespacetest.cpp +0 -70
- package/external/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
- package/external/rapidjson/test/unittest/pointertest.cpp +0 -1529
- package/external/rapidjson/test/unittest/prettywritertest.cpp +0 -373
- package/external/rapidjson/test/unittest/readertest.cpp +0 -2190
- package/external/rapidjson/test/unittest/regextest.cpp +0 -638
- package/external/rapidjson/test/unittest/schematest.cpp +0 -2072
- package/external/rapidjson/test/unittest/simdtest.cpp +0 -219
- package/external/rapidjson/test/unittest/strfunctest.cpp +0 -30
- package/external/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
- package/external/rapidjson/test/unittest/strtodtest.cpp +0 -132
- package/external/rapidjson/test/unittest/unittest.cpp +0 -51
- package/external/rapidjson/test/unittest/unittest.h +0 -140
- package/external/rapidjson/test/unittest/valuetest.cpp +0 -1851
- package/external/rapidjson/test/unittest/writertest.cpp +0 -598
- package/external/rapidjson/test/valgrind.supp +0 -17
- package/external/rapidjson/thirdparty/gtest/.travis.yml +0 -81
- package/external/rapidjson/thirdparty/gtest/BUILD.bazel +0 -175
- package/external/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -33
- package/external/rapidjson/thirdparty/gtest/CONTRIBUTING.md +0 -160
- package/external/rapidjson/thirdparty/gtest/LICENSE +0 -28
- package/external/rapidjson/thirdparty/gtest/Makefile.am +0 -14
- package/external/rapidjson/thirdparty/gtest/README.md +0 -122
- package/external/rapidjson/thirdparty/gtest/WORKSPACE +0 -8
- package/external/rapidjson/thirdparty/gtest/appveyor.yml +0 -104
- package/external/rapidjson/thirdparty/gtest/ci/build-linux-autotools.sh +0 -44
- package/external/rapidjson/thirdparty/gtest/ci/build-linux-bazel.sh +0 -36
- package/external/rapidjson/thirdparty/gtest/ci/env-linux.sh +0 -41
- package/external/rapidjson/thirdparty/gtest/ci/env-osx.sh +0 -40
- package/external/rapidjson/thirdparty/gtest/ci/get-nprocessors.sh +0 -48
- package/external/rapidjson/thirdparty/gtest/ci/install-linux.sh +0 -49
- package/external/rapidjson/thirdparty/gtest/ci/install-osx.sh +0 -39
- package/external/rapidjson/thirdparty/gtest/ci/log-config.sh +0 -51
- package/external/rapidjson/thirdparty/gtest/ci/travis.sh +0 -44
- package/external/rapidjson/thirdparty/gtest/configure.ac +0 -16
- package/external/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
- package/external/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -242
- package/external/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
- package/external/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
- package/external/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
- package/external/rapidjson/thirdparty/gtest/googlemock/README.md +0 -344
- package/external/rapidjson/thirdparty/gtest/googlemock/build-aux/.keep +0 -0
- package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock.pc.in +0 -9
- package/external/rapidjson/thirdparty/gtest/googlemock/cmake/gmock_main.pc.in +0 -9
- package/external/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -564
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3660
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -15
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -447
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -627
- package/external/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1262
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2571
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -833
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1379
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -347
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2258
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -675
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -458
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -178
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -5255
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -91
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1918
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -95
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -38
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -286
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -574
- package/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -87
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -46
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -145
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -151
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -176
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -46
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -145
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -151
- package/external/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -176
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -34
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
- package/external/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -204
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -573
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -883
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -205
- package/external/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
- package/external/rapidjson/thirdparty/gtest/googlemock/test/BUILD.bazel +0 -123
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1575
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1230
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -647
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -129
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1341
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -718
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -6767
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -710
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -511
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2771
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -691
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -183
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -310
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -317
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -323
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -262
- package/external/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -110
- package/external/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
- package/external/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -312
- package/external/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
- package/external/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
- package/external/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -339
- package/external/rapidjson/thirdparty/gtest/googletest/README.md +0 -341
- package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest.pc.in +0 -9
- package/external/rapidjson/thirdparty/gtest/googletest/cmake/gtest_main.pc.in +0 -10
- package/external/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -280
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
- package/external/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
- package/external/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
- package/external/rapidjson/thirdparty/gtest/googletest/docs/Pkgconfig.md +0 -146
- package/external/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
- package/external/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
- package/external/rapidjson/thirdparty/gtest/googletest/docs/advanced.md +0 -2416
- package/external/rapidjson/thirdparty/gtest/googletest/docs/faq.md +0 -1092
- package/external/rapidjson/thirdparty/gtest/googletest/docs/primer.md +0 -536
- package/external/rapidjson/thirdparty/gtest/googletest/docs/samples.md +0 -14
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -342
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -249
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1438
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -501
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -1082
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -231
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -264
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2332
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -357
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -61
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -70
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -45
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -275
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -205
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1277
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5139
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -279
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -723
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -100
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2687
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3347
- package/external/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -313
- package/external/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
- package/external/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.sln +0 -55
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj +0 -149
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest-md.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.sln +0 -55
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj +0 -149
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj +0 -154
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main-md.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj +0 -162
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_main.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj +0 -199
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters +0 -26
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj +0 -191
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters +0 -26
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj +0 -188
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj +0 -180
- package/external/rapidjson/thirdparty/gtest/googletest/msvc/2010/gtest_unittest.vcxproj.filters +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -127
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -140
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -154
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -110
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -152
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -49
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -225
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -118
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -174
- package/external/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -157
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
- package/external/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1536
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -385
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1175
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1277
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -458
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -102
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -119
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5846
- package/external/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
- package/external/rapidjson/thirdparty/gtest/googletest/test/BUILD.bazel +0 -396
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1424
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -652
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -213
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -61
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1110
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -53
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1303
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1737
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_assert_by_exception_test.cc +0 -119
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -210
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -87
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -235
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -129
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -63
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -119
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -124
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -189
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -638
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -138
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_outfiles_test.py +0 -162
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_output_unittest.py +0 -611
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_json_test_utils.py +0 -60
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -344
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1067
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -781
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -236
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -250
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -318
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test.py +0 -65
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_testbridge_test_.cc +0 -44
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -69
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7797
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -48
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -48
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -140
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -378
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -179
- package/external/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -196
- package/external/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
- package/external/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
- package/external/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1182
- package/external/rapidjson/travis-doxygen.sh +0 -121
- package/include/.clang-format +0 -76
- package/include/eosio/abi.hpp +0 -286
- package/include/eosio/asset.hpp +0 -458
- package/include/eosio/bytes.hpp +0 -27
- package/include/eosio/chain_conversions.hpp +0 -450
- package/include/eosio/chain_types.hpp +0 -14
- package/include/eosio/check.hpp +0 -178
- package/include/eosio/convert.hpp +0 -95
- package/include/eosio/crypto.hpp +0 -147
- package/include/eosio/eosio_outcome.hpp +0 -41
- package/include/eosio/fixed_bytes.hpp +0 -246
- package/include/eosio/float.hpp +0 -35
- package/include/eosio/for_each_field.hpp +0 -48
- package/include/eosio/fpconv.c +0 -336
- package/include/eosio/fpconv.h +0 -41
- package/include/eosio/fpconv.license +0 -23
- package/include/eosio/from_bin.hpp +0 -272
- package/include/eosio/from_json.hpp +0 -737
- package/include/eosio/from_string.hpp +0 -28
- package/include/eosio/map_macro.h +0 -64
- package/include/eosio/murmur.hpp +0 -55
- package/include/eosio/name.hpp +0 -174
- package/include/eosio/opaque.hpp +0 -108
- package/include/eosio/operators.hpp +0 -71
- package/include/eosio/powers.h +0 -76
- package/include/eosio/reflection.hpp +0 -61
- package/include/eosio/ship_protocol.hpp +0 -850
- package/include/eosio/stream.hpp +0 -231
- package/include/eosio/symbol.hpp +0 -300
- package/include/eosio/time.hpp +0 -264
- package/include/eosio/to_bin.hpp +0 -189
- package/include/eosio/to_json.hpp +0 -279
- package/include/eosio/to_key.hpp +0 -298
- package/include/eosio/types.hpp +0 -97
- package/include/eosio/varint.hpp +0 -452
- package/include/outcome-basic.hpp +0 -6836
- package/src/abi.cpp +0 -297
- package/src/abieos.cpp +0 -263
- package/src/abieos.h +0 -76
- package/src/abieos.hpp +0 -1010
- package/src/abieos_exception.hpp +0 -89
- package/src/abieos_numeric.hpp +0 -94
- package/src/abieos_ripemd160.hpp +0 -417
- package/src/crypto.cpp +0 -215
- package/src/key_test.cpp +0 -218
- package/src/main.cpp +0 -242
- package/src/reflect_test.cpp +0 -28
- package/src/template_test.cpp +0 -240
- package/src/test.cpp +0 -940
- package/tools/CMakeLists.txt +0 -9
- package/tools/name.cpp +0 -86
|
@@ -1,535 +0,0 @@
|
|
|
1
|
-
# 教程
|
|
2
|
-
|
|
3
|
-
本教程简介文件对象模型(Document Object Model, DOM)API。
|
|
4
|
-
|
|
5
|
-
如 [用法一览](../readme.zh-cn.md#用法一览) 中所示,可以解析一个 JSON 至 DOM,然后就可以轻松查询及修改 DOM,并最终转换回 JSON。
|
|
6
|
-
|
|
7
|
-
[TOC]
|
|
8
|
-
|
|
9
|
-
# Value 及 Document {#ValueDocument}
|
|
10
|
-
|
|
11
|
-
每个 JSON 值都储存为 `Value` 类,而 `Document` 类则表示整个 DOM,它存储了一个 DOM 树的根 `Value`。RapidJSON 的所有公开类型及函数都在 `rapidjson` 命名空间中。
|
|
12
|
-
|
|
13
|
-
# 查询 Value {#QueryValue}
|
|
14
|
-
|
|
15
|
-
在本节中,我们会使用到 `example/tutorial/tutorial.cpp` 中的代码片段。
|
|
16
|
-
|
|
17
|
-
假设我们用 C 语言的字符串储存一个 JSON(`const char* json`):
|
|
18
|
-
~~~~~~~~~~js
|
|
19
|
-
{
|
|
20
|
-
"hello": "world",
|
|
21
|
-
"t": true ,
|
|
22
|
-
"f": false,
|
|
23
|
-
"n": null,
|
|
24
|
-
"i": 123,
|
|
25
|
-
"pi": 3.1416,
|
|
26
|
-
"a": [1, 2, 3, 4]
|
|
27
|
-
}
|
|
28
|
-
~~~~~~~~~~
|
|
29
|
-
|
|
30
|
-
把它解析至一个 `Document`:
|
|
31
|
-
~~~~~~~~~~cpp
|
|
32
|
-
#include "rapidjson/document.h"
|
|
33
|
-
|
|
34
|
-
using namespace rapidjson;
|
|
35
|
-
|
|
36
|
-
// ...
|
|
37
|
-
Document document;
|
|
38
|
-
document.Parse(json);
|
|
39
|
-
~~~~~~~~~~
|
|
40
|
-
|
|
41
|
-
那么现在该 JSON 就会被解析至 `document` 中,成为一棵 *DOM 树 *:
|
|
42
|
-
|
|
43
|
-

|
|
44
|
-
|
|
45
|
-
自从 RFC 7159 作出更新,合法 JSON 文件的根可以是任何类型的 JSON 值。而在较早的 RFC 4627 中,根值只允许是 Object 或 Array。而在上述例子中,根是一个 Object。
|
|
46
|
-
~~~~~~~~~~cpp
|
|
47
|
-
assert(document.IsObject());
|
|
48
|
-
~~~~~~~~~~
|
|
49
|
-
|
|
50
|
-
让我们查询一下根 Object 中有没有 `"hello"` 成员。由于一个 `Value` 可包含不同类型的值,我们可能需要验证它的类型,并使用合适的 API 去获取其值。在此例中,`"hello"` 成员关联到一个 JSON String。
|
|
51
|
-
~~~~~~~~~~cpp
|
|
52
|
-
assert(document.HasMember("hello"));
|
|
53
|
-
assert(document["hello"].IsString());
|
|
54
|
-
printf("hello = %s\n", document["hello"].GetString());
|
|
55
|
-
~~~~~~~~~~
|
|
56
|
-
|
|
57
|
-
~~~~~~~~~~
|
|
58
|
-
world
|
|
59
|
-
~~~~~~~~~~
|
|
60
|
-
|
|
61
|
-
JSON True/False 值是以 `bool` 表示的。
|
|
62
|
-
~~~~~~~~~~cpp
|
|
63
|
-
assert(document["t"].IsBool());
|
|
64
|
-
printf("t = %s\n", document["t"].GetBool() ? "true" : "false");
|
|
65
|
-
~~~~~~~~~~
|
|
66
|
-
|
|
67
|
-
~~~~~~~~~~
|
|
68
|
-
true
|
|
69
|
-
~~~~~~~~~~
|
|
70
|
-
|
|
71
|
-
JSON Null 值可用 `IsNull()` 查询。
|
|
72
|
-
~~~~~~~~~~cpp
|
|
73
|
-
printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
|
|
74
|
-
~~~~~~~~~~
|
|
75
|
-
|
|
76
|
-
~~~~~~~~~~
|
|
77
|
-
null
|
|
78
|
-
~~~~~~~~~~
|
|
79
|
-
|
|
80
|
-
JSON Number 类型表示所有数值。然而,C++ 需要使用更专门的类型。
|
|
81
|
-
|
|
82
|
-
~~~~~~~~~~cpp
|
|
83
|
-
assert(document["i"].IsNumber());
|
|
84
|
-
|
|
85
|
-
// 在此情况下,IsUint()/IsInt64()/IsUInt64() 也会返回 true
|
|
86
|
-
assert(document["i"].IsInt());
|
|
87
|
-
printf("i = %d\n", document["i"].GetInt());
|
|
88
|
-
// 另一种用法: (int)document["i"]
|
|
89
|
-
|
|
90
|
-
assert(document["pi"].IsNumber());
|
|
91
|
-
assert(document["pi"].IsDouble());
|
|
92
|
-
printf("pi = %g\n", document["pi"].GetDouble());
|
|
93
|
-
~~~~~~~~~~
|
|
94
|
-
|
|
95
|
-
~~~~~~~~~~
|
|
96
|
-
i = 123
|
|
97
|
-
pi = 3.1416
|
|
98
|
-
~~~~~~~~~~
|
|
99
|
-
|
|
100
|
-
JSON Array 包含一些元素。
|
|
101
|
-
~~~~~~~~~~cpp
|
|
102
|
-
// 使用引用来连续访问,方便之余还更高效。
|
|
103
|
-
const Value& a = document["a"];
|
|
104
|
-
assert(a.IsArray());
|
|
105
|
-
for (SizeType i = 0; i < a.Size(); i++) // 使用 SizeType 而不是 size_t
|
|
106
|
-
printf("a[%d] = %d\n", i, a[i].GetInt());
|
|
107
|
-
~~~~~~~~~~
|
|
108
|
-
|
|
109
|
-
~~~~~~~~~~
|
|
110
|
-
a[0] = 1
|
|
111
|
-
a[1] = 2
|
|
112
|
-
a[2] = 3
|
|
113
|
-
a[3] = 4
|
|
114
|
-
~~~~~~~~~~
|
|
115
|
-
|
|
116
|
-
注意,RapidJSON 并不自动转换各种 JSON 类型。例如,对一个 String 的 Value 调用 `GetInt()` 是非法的。在调试模式下,它会被断言失败。在发布模式下,其行为是未定义的。
|
|
117
|
-
|
|
118
|
-
以下将会讨论有关查询各类型的细节。
|
|
119
|
-
|
|
120
|
-
## 查询 Array {#QueryArray}
|
|
121
|
-
|
|
122
|
-
缺省情况下,`SizeType` 是 `unsigned` 的 typedef。在多数系统中,Array 最多能存储 2^32-1 个元素。
|
|
123
|
-
|
|
124
|
-
你可以用整数字面量访问元素,如 `a[0]`、`a[1]`、`a[2]`。
|
|
125
|
-
|
|
126
|
-
Array 与 `std::vector` 相似,除了使用索引,也可使用迭代器来访问所有元素。
|
|
127
|
-
~~~~~~~~~~cpp
|
|
128
|
-
for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)
|
|
129
|
-
printf("%d ", itr->GetInt());
|
|
130
|
-
~~~~~~~~~~
|
|
131
|
-
|
|
132
|
-
还有一些熟悉的查询函数:
|
|
133
|
-
* `SizeType Capacity() const`
|
|
134
|
-
* `bool Empty() const`
|
|
135
|
-
|
|
136
|
-
### 范围 for 循环 (v1.1.0 中的新功能)
|
|
137
|
-
|
|
138
|
-
当使用 C++11 功能时,你可使用范围 for 循环去访问 Array 内的所有元素。
|
|
139
|
-
|
|
140
|
-
~~~~~~~~~~cpp
|
|
141
|
-
for (auto& v : a.GetArray())
|
|
142
|
-
printf("%d ", v.GetInt());
|
|
143
|
-
~~~~~~~~~~
|
|
144
|
-
|
|
145
|
-
## 查询 Object {#QueryObject}
|
|
146
|
-
|
|
147
|
-
和 Array 相似,我们可以用迭代器去访问所有 Object 成员:
|
|
148
|
-
|
|
149
|
-
~~~~~~~~~~cpp
|
|
150
|
-
static const char* kTypeNames[] =
|
|
151
|
-
{ "Null", "False", "True", "Object", "Array", "String", "Number" };
|
|
152
|
-
|
|
153
|
-
for (Value::ConstMemberIterator itr = document.MemberBegin();
|
|
154
|
-
itr != document.MemberEnd(); ++itr)
|
|
155
|
-
{
|
|
156
|
-
printf("Type of member %s is %s\n",
|
|
157
|
-
itr->name.GetString(), kTypeNames[itr->value.GetType()]);
|
|
158
|
-
}
|
|
159
|
-
~~~~~~~~~~
|
|
160
|
-
|
|
161
|
-
~~~~~~~~~~
|
|
162
|
-
Type of member hello is String
|
|
163
|
-
Type of member t is True
|
|
164
|
-
Type of member f is False
|
|
165
|
-
Type of member n is Null
|
|
166
|
-
Type of member i is Number
|
|
167
|
-
Type of member pi is Number
|
|
168
|
-
Type of member a is Array
|
|
169
|
-
~~~~~~~~~~
|
|
170
|
-
|
|
171
|
-
注意,当 `operator[](const char*)` 找不到成员,它会断言失败。
|
|
172
|
-
|
|
173
|
-
若我们不确定一个成员是否存在,便需要在调用 `operator[](const char*)` 前先调用 `HasMember()`。然而,这会导致两次查找。更好的做法是调用 `FindMember()`,它能同时检查成员是否存在并返回它的 Value:
|
|
174
|
-
|
|
175
|
-
~~~~~~~~~~cpp
|
|
176
|
-
Value::ConstMemberIterator itr = document.FindMember("hello");
|
|
177
|
-
if (itr != document.MemberEnd())
|
|
178
|
-
printf("%s\n", itr->value.GetString());
|
|
179
|
-
~~~~~~~~~~
|
|
180
|
-
|
|
181
|
-
### 范围 for 循环 (v1.1.0 中的新功能)
|
|
182
|
-
|
|
183
|
-
当使用 C++11 功能时,你可使用范围 for 循环去访问 Object 内的所有成员。
|
|
184
|
-
|
|
185
|
-
~~~~~~~~~~cpp
|
|
186
|
-
for (auto& m : document.GetObject())
|
|
187
|
-
printf("Type of member %s is %s\n",
|
|
188
|
-
m.name.GetString(), kTypeNames[m.value.GetType()]);
|
|
189
|
-
~~~~~~~~~~
|
|
190
|
-
|
|
191
|
-
## 查询 Number {#QueryNumber}
|
|
192
|
-
|
|
193
|
-
JSON 只提供一种数值类型──Number。数字可以是整数或实数。RFC 4627 规定数字的范围由解析器指定。
|
|
194
|
-
|
|
195
|
-
由于 C++ 提供多种整数及浮点数类型,DOM 尝试尽量提供最广的范围及良好性能。
|
|
196
|
-
|
|
197
|
-
当解析一个 Number 时, 它会被存储在 DOM 之中,成为下列其中一个类型:
|
|
198
|
-
|
|
199
|
-
类型 | 描述
|
|
200
|
-
-----------|---------------------------------------
|
|
201
|
-
`unsigned` | 32 位无号整数
|
|
202
|
-
`int` | 32 位有号整数
|
|
203
|
-
`uint64_t` | 64 位无号整数
|
|
204
|
-
`int64_t` | 64 位有号整数
|
|
205
|
-
`double` | 64 位双精度浮点数
|
|
206
|
-
|
|
207
|
-
当查询一个 Number 时, 你可以检查该数字是否能以目标类型来提取:
|
|
208
|
-
|
|
209
|
-
查检 | 提取
|
|
210
|
-
------------------|---------------------
|
|
211
|
-
`bool IsNumber()` | 不适用
|
|
212
|
-
`bool IsUint()` | `unsigned GetUint()`
|
|
213
|
-
`bool IsInt()` | `int GetInt()`
|
|
214
|
-
`bool IsUint64()` | `uint64_t GetUint64()`
|
|
215
|
-
`bool IsInt64()` | `int64_t GetInt64()`
|
|
216
|
-
`bool IsDouble()` | `double GetDouble()`
|
|
217
|
-
|
|
218
|
-
注意,一个整数可能用几种类型来提取,而无需转换。例如,一个名为 `x` 的 Value 包含 123,那么 `x.IsInt() == x.IsUint() == x.IsInt64() == x.IsUint64() == true`。但如果一个名为 `y` 的 Value 包含 -3000000000,那么仅会令 `x.IsInt64() == true`。
|
|
219
|
-
|
|
220
|
-
当要提取 Number 类型,`GetDouble()` 是会把内部整数的表示转换成 `double`。注意 `int` 和 `unsigned` 可以安全地转换至 `double`,但 `int64_t` 及 `uint64_t` 可能会丧失精度(因为 `double` 的尾数只有 52 位)。
|
|
221
|
-
|
|
222
|
-
## 查询 String {#QueryString}
|
|
223
|
-
|
|
224
|
-
除了 `GetString()`,`Value` 类也有一个 `GetStringLength()`。这里会解释个中原因。
|
|
225
|
-
|
|
226
|
-
根据 RFC 4627,JSON String 可包含 Unicode 字符 `U+0000`,在 JSON 中会表示为 `"\u0000"`。问题是,C/C++ 通常使用空字符结尾字符串(null-terminated string),这种字符串把 ``\0'` 作为结束符号。
|
|
227
|
-
|
|
228
|
-
为了符合 RFC 4627,RapidJSON 支持包含 `U+0000` 的 String。若你需要处理这些 String,便可使用 `GetStringLength()` 去获得正确的字符串长度。
|
|
229
|
-
|
|
230
|
-
例如,当解析以下的 JSON 至 `Document d` 之后:
|
|
231
|
-
|
|
232
|
-
~~~~~~~~~~js
|
|
233
|
-
{ "s" : "a\u0000b" }
|
|
234
|
-
~~~~~~~~~~
|
|
235
|
-
`"a\u0000b"` 值的正确长度应该是 3。但 `strlen()` 会返回 1。
|
|
236
|
-
|
|
237
|
-
`GetStringLength()` 也可以提高性能,因为用户可能需要调用 `strlen()` 去分配缓冲。
|
|
238
|
-
|
|
239
|
-
此外,`std::string` 也支持这个构造函数:
|
|
240
|
-
|
|
241
|
-
~~~~~~~~~~cpp
|
|
242
|
-
string(const char* s, size_t count);
|
|
243
|
-
~~~~~~~~~~
|
|
244
|
-
|
|
245
|
-
此构造函数接受字符串长度作为参数。它支持在字符串中存储空字符,也应该会有更好的性能。
|
|
246
|
-
|
|
247
|
-
## 比较两个 Value
|
|
248
|
-
|
|
249
|
-
你可使用 `==` 及 `!=` 去比较两个 Value。当且仅当两个 Value 的类型及内容相同,它们才当作相等。你也可以比较 Value 和它的原生类型值。以下是一个例子。
|
|
250
|
-
|
|
251
|
-
~~~~~~~~~~cpp
|
|
252
|
-
if (document["hello"] == document["n"]) /*...*/; // 比较两个值
|
|
253
|
-
if (document["hello"] == "world") /*...*/; // 与字符串家面量作比较
|
|
254
|
-
if (document["i"] != 123) /*...*/; // 与整数作比较
|
|
255
|
-
if (document["pi"] != 3.14) /*...*/; // 与 double 作比较
|
|
256
|
-
~~~~~~~~~~
|
|
257
|
-
|
|
258
|
-
Array/Object 顺序以它们的元素/成员作比较。当且仅当它们的整个子树相等,它们才当作相等。
|
|
259
|
-
|
|
260
|
-
注意,现时若一个 Object 含有重复命名的成员,它与任何 Object 作比较都总会返回 `false`。
|
|
261
|
-
|
|
262
|
-
# 创建/修改值 {#CreateModifyValues}
|
|
263
|
-
|
|
264
|
-
有多种方法去创建值。 当一个 DOM 树被创建或修改后,可使用 `Writer` 再次存储为 JSON。
|
|
265
|
-
|
|
266
|
-
## 改变 Value 类型 {#ChangeValueType}
|
|
267
|
-
当使用默认构造函数创建一个 Value 或 Document,它的类型便会是 Null。要改变其类型,需调用 `SetXXX()` 或赋值操作,例如:
|
|
268
|
-
|
|
269
|
-
~~~~~~~~~~cpp
|
|
270
|
-
Document d; // Null
|
|
271
|
-
d.SetObject();
|
|
272
|
-
|
|
273
|
-
Value v; // Null
|
|
274
|
-
v.SetInt(10);
|
|
275
|
-
v = 10; // 简写,和上面的相同
|
|
276
|
-
~~~~~~~~~~
|
|
277
|
-
|
|
278
|
-
### 构造函数的各个重载
|
|
279
|
-
几个类型也有重载构造函数:
|
|
280
|
-
|
|
281
|
-
~~~~~~~~~~cpp
|
|
282
|
-
Value b(true); // 调用 Value(bool)
|
|
283
|
-
Value i(-123); // 调用 Value(int)
|
|
284
|
-
Value u(123u); // 调用 Value(unsigned)
|
|
285
|
-
Value d(1.5); // 调用 Value(double)
|
|
286
|
-
~~~~~~~~~~
|
|
287
|
-
|
|
288
|
-
要重建空 Object 或 Array,可在默认构造函数后使用 `SetObject()`/`SetArray()`,或一次性使用 `Value(Type)`:
|
|
289
|
-
|
|
290
|
-
~~~~~~~~~~cpp
|
|
291
|
-
Value o(kObjectType);
|
|
292
|
-
Value a(kArrayType);
|
|
293
|
-
~~~~~~~~~~
|
|
294
|
-
|
|
295
|
-
## 转移语义(Move Semantics) {#MoveSemantics}
|
|
296
|
-
|
|
297
|
-
在设计 RapidJSON 时有一个非常特别的决定,就是 Value 赋值并不是把来源 Value 复制至目的 Value,而是把来源 Value 转移(move)至目的 Value。例如:
|
|
298
|
-
|
|
299
|
-
~~~~~~~~~~cpp
|
|
300
|
-
Value a(123);
|
|
301
|
-
Value b(456);
|
|
302
|
-
b = a; // a 变成 Null,b 变成数字 123。
|
|
303
|
-
~~~~~~~~~~
|
|
304
|
-
|
|
305
|
-

|
|
306
|
-
|
|
307
|
-
为什么?此语义有何优点?
|
|
308
|
-
|
|
309
|
-
最简单的答案就是性能。对于固定大小的 JSON 类型(Number、True、False、Null),复制它们是简单快捷。然而,对于可变大小的 JSON 类型(String、Array、Object),复制它们会产生大量开销,而且这些开销常常不被察觉。尤其是当我们需要创建临时 Object,把它复制至另一变量,然后再析构它。
|
|
310
|
-
|
|
311
|
-
例如,若使用正常 * 复制 * 语义:
|
|
312
|
-
|
|
313
|
-
~~~~~~~~~~cpp
|
|
314
|
-
Value o(kObjectType);
|
|
315
|
-
{
|
|
316
|
-
Value contacts(kArrayType);
|
|
317
|
-
// 把元素加进 contacts 数组。
|
|
318
|
-
// ...
|
|
319
|
-
o.AddMember("contacts", contacts, d.GetAllocator()); // 深度复制 contacts (可能有大量内存分配)
|
|
320
|
-
// 析构 contacts。
|
|
321
|
-
}
|
|
322
|
-
~~~~~~~~~~
|
|
323
|
-
|
|
324
|
-

|
|
325
|
-
|
|
326
|
-
那个 `o` Object 需要分配一个和 contacts 相同大小的缓冲区,对 conacts 做深度复制,并最终要析构 contacts。这样会产生大量无必要的内存分配/释放,以及内存复制。
|
|
327
|
-
|
|
328
|
-
有一些方案可避免实质地复制这些数据,例如引用计数(reference counting)、垃圾回收(garbage collection, GC)。
|
|
329
|
-
|
|
330
|
-
为了使 RapidJSON 简单及快速,我们选择了对赋值采用 * 转移 * 语义。这方法与 `std::auto_ptr` 相似,都是在赋值时转移拥有权。转移快得多简单得多,只需要析构原来的 Value,把来源 `memcpy()` 至目标,最后把来源设置为 Null 类型。
|
|
331
|
-
|
|
332
|
-
因此,使用转移语义后,上面的例子变成:
|
|
333
|
-
|
|
334
|
-
~~~~~~~~~~cpp
|
|
335
|
-
Value o(kObjectType);
|
|
336
|
-
{
|
|
337
|
-
Value contacts(kArrayType);
|
|
338
|
-
// adding elements to contacts array.
|
|
339
|
-
o.AddMember("contacts", contacts, d.GetAllocator()); // 只需 memcpy() contacts 本身至新成员的 Value(16 字节)
|
|
340
|
-
// contacts 在这里变成 Null。它的析构是平凡的。
|
|
341
|
-
}
|
|
342
|
-
~~~~~~~~~~
|
|
343
|
-
|
|
344
|
-

|
|
345
|
-
|
|
346
|
-
在 C++11 中这称为转移赋值操作(move assignment operator)。由于 RapidJSON 支持 C++03,它在赋值操作采用转移语义,其它修改型函数如 `AddMember()`, `PushBack()` 也采用转移语义。
|
|
347
|
-
|
|
348
|
-
### 转移语义及临时值 {#TemporaryValues}
|
|
349
|
-
|
|
350
|
-
有时候,我们想直接构造一个 Value 并传递给一个“转移”函数(如 `PushBack()`、`AddMember()`)。由于临时对象是不能转换为正常的 Value 引用,我们加入了一个方便的 `Move()` 函数:
|
|
351
|
-
|
|
352
|
-
~~~~~~~~~~cpp
|
|
353
|
-
Value a(kArrayType);
|
|
354
|
-
Document::AllocatorType& allocator = document.GetAllocator();
|
|
355
|
-
// a.PushBack(Value(42), allocator); // 不能通过编译
|
|
356
|
-
a.PushBack(Value().SetInt(42), allocator); // fluent API
|
|
357
|
-
a.PushBack(Value(42).Move(), allocator); // 和上一行相同
|
|
358
|
-
~~~~~~~~~~
|
|
359
|
-
|
|
360
|
-
## 创建 String {#CreateString}
|
|
361
|
-
RapidJSON 提供两个 String 的存储策略。
|
|
362
|
-
|
|
363
|
-
1. copy-string: 分配缓冲区,然后把来源数据复制至它。
|
|
364
|
-
2. const-string: 简单地储存字符串的指针。
|
|
365
|
-
|
|
366
|
-
Copy-string 总是安全的,因为它拥有数据的克隆。Const-string 可用于存储字符串字面量,以及用于在 DOM 一节中将会提到的 in-situ 解析中。
|
|
367
|
-
|
|
368
|
-
为了让用户自定义内存分配方式,当一个操作可能需要内存分配时,RapidJSON 要求用户传递一个 allocator 实例作为 API 参数。此设计避免了在每个 Value 存储 allocator(或 document)的指针。
|
|
369
|
-
|
|
370
|
-
因此,当我们把一个 copy-string 赋值时, 调用含有 allocator 的 `SetString()` 重载函数:
|
|
371
|
-
|
|
372
|
-
~~~~~~~~~~cpp
|
|
373
|
-
Document document;
|
|
374
|
-
Value author;
|
|
375
|
-
char buffer[10];
|
|
376
|
-
int len = sprintf(buffer, "%s %s", "Milo", "Yip"); // 动态创建的字符串。
|
|
377
|
-
author.SetString(buffer, len, document.GetAllocator());
|
|
378
|
-
memset(buffer, 0, sizeof(buffer));
|
|
379
|
-
// 清空 buffer 后 author.GetString() 仍然包含 "Milo Yip"
|
|
380
|
-
~~~~~~~~~~
|
|
381
|
-
|
|
382
|
-
在此例子中,我们使用 `Document` 实例的 allocator。这是使用 RapidJSON 时常用的惯用法。但你也可以用其他 allocator 实例。
|
|
383
|
-
|
|
384
|
-
另外,上面的 `SetString()` 需要长度参数。这个 API 能处理含有空字符的字符串。另一个 `SetString()` 重载函数没有长度参数,它假设输入是空字符结尾的,并会调用类似 `strlen()` 的函数去获取长度。
|
|
385
|
-
|
|
386
|
-
最后,对于字符串字面量或有安全生命周期的字符串,可以使用 const-string 版本的 `SetString()`,它没有
|
|
387
|
-
allocator 参数。对于字符串字面量(或字符数组常量),只需简单地传递字面量,又安全又高效:
|
|
388
|
-
|
|
389
|
-
~~~~~~~~~~cpp
|
|
390
|
-
Value s;
|
|
391
|
-
s.SetString("rapidjson"); // 可包含空字符,长度在编译萁推导
|
|
392
|
-
s = "rapidjson"; // 上行的缩写
|
|
393
|
-
~~~~~~~~~~
|
|
394
|
-
|
|
395
|
-
对于字符指针,RapidJSON 需要作一个标记,代表它不复制也是安全的。可以使用 `StringRef` 函数:
|
|
396
|
-
|
|
397
|
-
~~~~~~~~~cpp
|
|
398
|
-
const char * cstr = getenv("USER");
|
|
399
|
-
size_t cstr_len = ...; // 如果有长度
|
|
400
|
-
Value s;
|
|
401
|
-
// s.SetString(cstr); // 这不能通过编译
|
|
402
|
-
s.SetString(StringRef(cstr)); // 可以,假设它的生命周期安全,并且是以空字符结尾的
|
|
403
|
-
s = StringRef(cstr); // 上行的缩写
|
|
404
|
-
s.SetString(StringRef(cstr, cstr_len));// 更快,可处理空字符
|
|
405
|
-
s = StringRef(cstr, cstr_len); // 上行的缩写
|
|
406
|
-
|
|
407
|
-
~~~~~~~~~
|
|
408
|
-
|
|
409
|
-
## 修改 Array {#ModifyArray}
|
|
410
|
-
Array 类型的 Value 提供与 `std::vector` 相似的 API。
|
|
411
|
-
|
|
412
|
-
* `Clear()`
|
|
413
|
-
* `Reserve(SizeType, Allocator&)`
|
|
414
|
-
* `Value& PushBack(Value&, Allocator&)`
|
|
415
|
-
* `template <typename T> GenericValue& PushBack(T, Allocator&)`
|
|
416
|
-
* `Value& PopBack()`
|
|
417
|
-
* `ValueIterator Erase(ConstValueIterator pos)`
|
|
418
|
-
* `ValueIterator Erase(ConstValueIterator first, ConstValueIterator last)`
|
|
419
|
-
|
|
420
|
-
注意,`Reserve(...)` 及 `PushBack(...)` 可能会为数组元素分配内存,所以需要一个 allocator。
|
|
421
|
-
|
|
422
|
-
以下是 `PushBack()` 的例子:
|
|
423
|
-
|
|
424
|
-
~~~~~~~~~~cpp
|
|
425
|
-
Value a(kArrayType);
|
|
426
|
-
Document::AllocatorType& allocator = document.GetAllocator();
|
|
427
|
-
|
|
428
|
-
for (int i = 5; i <= 10; i++)
|
|
429
|
-
a.PushBack(i, allocator); // 可能需要调用 realloc() 所以需要 allocator
|
|
430
|
-
|
|
431
|
-
// 流畅接口(Fluent interface)
|
|
432
|
-
a.PushBack("Lua", allocator).PushBack("Mio", allocator);
|
|
433
|
-
~~~~~~~~~~
|
|
434
|
-
|
|
435
|
-
与 STL 不一样的是,`PushBack()`/`PopBack()` 返回 Array 本身的引用。这称为流畅接口(_fluent interface_)。
|
|
436
|
-
|
|
437
|
-
如果你想在 Array 中加入一个非常量字符串,或是一个没有足够生命周期的字符串(见 [Create String](#CreateString)),你需要使用 copy-string API 去创建一个 String。为了避免加入中间变量,可以就地使用一个 [临时值](#TemporaryValues):
|
|
438
|
-
|
|
439
|
-
~~~~~~~~~~cpp
|
|
440
|
-
// 就地 Value 参数
|
|
441
|
-
contact.PushBack(Value("copy", document.GetAllocator()).Move(), // copy string
|
|
442
|
-
document.GetAllocator());
|
|
443
|
-
|
|
444
|
-
// 显式 Value 参数
|
|
445
|
-
Value val("key", document.GetAllocator()); // copy string
|
|
446
|
-
contact.PushBack(val, document.GetAllocator());
|
|
447
|
-
~~~~~~~~~~
|
|
448
|
-
|
|
449
|
-
## 修改 Object {#ModifyObject}
|
|
450
|
-
Object 是键值对的集合。每个键必须为 String。要修改 Object,方法是增加或移除成员。以下的 API 用来增加城员:
|
|
451
|
-
|
|
452
|
-
* `Value& AddMember(Value&, Value&, Allocator& allocator)`
|
|
453
|
-
* `Value& AddMember(StringRefType, Value&, Allocator&)`
|
|
454
|
-
* `template <typename T> Value& AddMember(StringRefType, T value, Allocator&)`
|
|
455
|
-
|
|
456
|
-
以下是一个例子。
|
|
457
|
-
|
|
458
|
-
~~~~~~~~~~cpp
|
|
459
|
-
Value contact(kObject);
|
|
460
|
-
contact.AddMember("name", "Milo", document.GetAllocator());
|
|
461
|
-
contact.AddMember("married", true, document.GetAllocator());
|
|
462
|
-
~~~~~~~~~~
|
|
463
|
-
|
|
464
|
-
使用 `StringRefType` 作为 name 参数的重载版本与字符串的 `SetString` 的接口相似。 这些重载是为了避免复制 `name` 字符串,因为 JSON object 中经常会使用常数键名。
|
|
465
|
-
|
|
466
|
-
如果你需要从非常数字符串或生命周期不足的字符串创建键名(见 [创建 String](#CreateString)),你需要使用 copy-string API。为了避免中间变量,可以就地使用 [临时值](#TemporaryValues):
|
|
467
|
-
|
|
468
|
-
~~~~~~~~~~cpp
|
|
469
|
-
// 就地 Value 参数
|
|
470
|
-
contact.AddMember(Value("copy", document.GetAllocator()).Move(), // copy string
|
|
471
|
-
Value().Move(), // null value
|
|
472
|
-
document.GetAllocator());
|
|
473
|
-
|
|
474
|
-
// 显式参数
|
|
475
|
-
Value key("key", document.GetAllocator()); // copy string name
|
|
476
|
-
Value val(42); // 某 Value
|
|
477
|
-
contact.AddMember(key, val, document.GetAllocator());
|
|
478
|
-
~~~~~~~~~~
|
|
479
|
-
|
|
480
|
-
移除成员有几个选择:
|
|
481
|
-
|
|
482
|
-
* `bool RemoveMember(const Ch* name)`:使用键名来移除成员(线性时间复杂度)。
|
|
483
|
-
* `bool RemoveMember(const Value& name)`:除了 `name` 是一个 Value,和上一行相同。
|
|
484
|
-
* `MemberIterator RemoveMember(MemberIterator)`:使用迭代器移除成员(_ 常数 _ 时间复杂度)。
|
|
485
|
-
* `MemberIterator EraseMember(MemberIterator)`:和上行相似但维持成员次序(线性时间复杂度)。
|
|
486
|
-
* `MemberIterator EraseMember(MemberIterator first, MemberIterator last)`:移除一个范围内的成员,维持次序(线性时间复杂度)。
|
|
487
|
-
|
|
488
|
-
`MemberIterator RemoveMember(MemberIterator)` 使用了“转移最后”手法来达成常数时间复杂度。基本上就是析构迭代器位置的成员,然后把最后的成员转移至迭代器位置。因此,成员的次序会被改变。
|
|
489
|
-
|
|
490
|
-
## 深复制 Value {#DeepCopyValue}
|
|
491
|
-
若我们真的要复制一个 DOM 树,我们可使用两个 APIs 作深复制:含 allocator 的构造函数及 `CopyFrom()`。
|
|
492
|
-
|
|
493
|
-
~~~~~~~~~~cpp
|
|
494
|
-
Document d;
|
|
495
|
-
Document::AllocatorType& a = d.GetAllocator();
|
|
496
|
-
Value v1("foo");
|
|
497
|
-
// Value v2(v1); // 不容许
|
|
498
|
-
|
|
499
|
-
Value v2(v1, a); // 制造一个克隆
|
|
500
|
-
assert(v1.IsString()); // v1 不变
|
|
501
|
-
d.SetArray().PushBack(v1, a).PushBack(v2, a);
|
|
502
|
-
assert(v1.IsNull() && v2.IsNull()); // 两个都转移动 d
|
|
503
|
-
|
|
504
|
-
v2.CopyFrom(d, a); // 把整个 document 复制至 v2
|
|
505
|
-
assert(d.IsArray() && d.Size() == 2); // d 不变
|
|
506
|
-
v1.SetObject().AddMember("array", v2, a);
|
|
507
|
-
d.PushBack(v1, a);
|
|
508
|
-
~~~~~~~~~~
|
|
509
|
-
|
|
510
|
-
## 交换 Value {#SwapValues}
|
|
511
|
-
|
|
512
|
-
RapidJSON 也提供 `Swap()`。
|
|
513
|
-
|
|
514
|
-
~~~~~~~~~~cpp
|
|
515
|
-
Value a(123);
|
|
516
|
-
Value b("Hello");
|
|
517
|
-
a.Swap(b);
|
|
518
|
-
assert(a.IsString());
|
|
519
|
-
assert(b.IsInt());
|
|
520
|
-
~~~~~~~~~~
|
|
521
|
-
|
|
522
|
-
无论两棵 DOM 树有多复杂,交换是很快的(常数时间)。
|
|
523
|
-
|
|
524
|
-
# 下一部分 {#WhatsNext}
|
|
525
|
-
|
|
526
|
-
本教程展示了如何询查及修改 DOM 树。RapidJSON 还有一个重要概念:
|
|
527
|
-
|
|
528
|
-
1. [流](doc/stream.zh-cn.md) 是读写 JSON 的通道。流可以是内存字符串、文件流等。用户也可以自定义流。
|
|
529
|
-
2. [编码](doc/encoding.zh-cn.md) 定义在流或内存中使用的字符编码。RapidJSON 也在内部提供 Unicode 转换及校验功能。
|
|
530
|
-
3. [DOM](doc/dom.zh-cn.md) 的基本功能已在本教程里介绍。还有更高级的功能,如原位(*in situ*)解析、其他解析选项及高级用法。
|
|
531
|
-
4. [SAX](doc/sax.zh-cn.md) 是 RapidJSON 解析/生成功能的基础。学习使用 `Reader`/`Writer` 去实现更高性能的应用程序。也可以使用 `PrettyWriter` 去格式化 JSON。
|
|
532
|
-
5. [性能](doc/performance.zh-cn.md) 展示一些我们做的及第三方的性能测试。
|
|
533
|
-
6. [技术内幕](doc/internals.md) 讲述一些 RapidJSON 内部的设计及技术。
|
|
534
|
-
|
|
535
|
-
你也可以参考 [常见问题](doc/faq.zh-cn.md)、API 文档、例子及单元测试。
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 2.8)
|
|
2
|
-
|
|
3
|
-
if(POLICY CMP0054)
|
|
4
|
-
cmake_policy(SET CMP0054 NEW)
|
|
5
|
-
endif()
|
|
6
|
-
|
|
7
|
-
set(EXAMPLES
|
|
8
|
-
capitalize
|
|
9
|
-
condense
|
|
10
|
-
filterkey
|
|
11
|
-
filterkeydom
|
|
12
|
-
jsonx
|
|
13
|
-
lookaheadparser
|
|
14
|
-
messagereader
|
|
15
|
-
parsebyparts
|
|
16
|
-
pretty
|
|
17
|
-
prettyauto
|
|
18
|
-
schemavalidator
|
|
19
|
-
serialize
|
|
20
|
-
simpledom
|
|
21
|
-
simplereader
|
|
22
|
-
simplepullreader
|
|
23
|
-
simplewriter
|
|
24
|
-
tutorial)
|
|
25
|
-
|
|
26
|
-
include_directories("../include/")
|
|
27
|
-
|
|
28
|
-
add_definitions(-D__STDC_FORMAT_MACROS)
|
|
29
|
-
set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS})
|
|
30
|
-
|
|
31
|
-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
32
|
-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
|
33
|
-
endif()
|
|
34
|
-
|
|
35
|
-
add_executable(archivertest archiver/archiver.cpp archiver/archivertest.cpp)
|
|
36
|
-
|
|
37
|
-
foreach (example ${EXAMPLES})
|
|
38
|
-
add_executable(${example} ${example}/${example}.cpp)
|
|
39
|
-
endforeach()
|
|
40
|
-
|
|
41
|
-
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
42
|
-
target_link_libraries(parsebyparts pthread)
|
|
43
|
-
endif()
|
|
44
|
-
|
|
45
|
-
add_custom_target(examples ALL DEPENDS ${EXAMPLES})
|