rj_schema 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +3 -615
- data/ext/rj_schema/rapidjson/CHANGELOG.md +0 -158
- data/ext/rj_schema/rapidjson/CMakeLists.txt +0 -221
- data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
- data/ext/rj_schema/rapidjson/RapidJSON.pc.in +0 -7
- data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +0 -15
- data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
- data/ext/rj_schema/rapidjson/appveyor.yml +0 -41
- data/ext/rj_schema/rapidjson/bin/data/glossary.json +0 -22
- data/ext/rj_schema/rapidjson/bin/data/menu.json +0 -27
- data/ext/rj_schema/rapidjson/bin/data/readme.txt +0 -1
- data/ext/rj_schema/rapidjson/bin/data/sample.json +0 -3315
- data/ext/rj_schema/rapidjson/bin/data/webapp.json +0 -88
- data/ext/rj_schema/rapidjson/bin/data/widget.json +0 -26
- data/ext/rj_schema/rapidjson/bin/draft-04/schema +0 -150
- data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
- data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +0 -7
- data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +0 -7
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +0 -2
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +0 -2
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +0 -58
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +0 -1
- data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +0 -6
- data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +0 -19
- data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +0 -148
- data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +0 -283
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +0 -3
- data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +0 -8
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +0 -82
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +0 -88
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +0 -49
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +0 -108
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +0 -80
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +0 -60
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +0 -71
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +0 -94
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +0 -46
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +0 -107
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +0 -222
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +0 -18
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +0 -15
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +0 -34
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +0 -110
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +0 -92
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +0 -159
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +0 -74
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +0 -53
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +0 -474
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +0 -79
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +0 -82
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +0 -88
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +0 -112
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +0 -68
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +0 -49
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +0 -32
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +0 -113
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +0 -72
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +0 -46
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +0 -33
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +0 -28
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +0 -42
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +0 -60
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +0 -96
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +0 -68
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +0 -107
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +0 -148
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +0 -15
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +0 -34
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +0 -110
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +0 -92
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +0 -159
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +0 -74
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +0 -39
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +0 -330
- data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +0 -79
- data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +0 -8
- data/ext/rj_schema/rapidjson/bin/types/booleans.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/floats.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/guids.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/integers.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/mixed.json +0 -592
- data/ext/rj_schema/rapidjson/bin/types/nulls.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +0 -102
- data/ext/rj_schema/rapidjson/bin/types/readme.txt +0 -1
- data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +0 -45
- data/ext/rj_schema/rapidjson/contrib/natvis/README.md +0 -7
- data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
- data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +0 -27
- data/ext/rj_schema/rapidjson/doc/Doxyfile.in +0 -2369
- data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +0 -50
- data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +0 -65
- data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
- data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/makefile +0 -8
- data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +0 -47
- data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +0 -62
- data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +0 -60
- data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +0 -56
- data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +0 -54
- data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +0 -58
- data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +0 -73
- data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
- data/ext/rj_schema/rapidjson/doc/dom.md +0 -280
- data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +0 -284
- data/ext/rj_schema/rapidjson/doc/encoding.md +0 -146
- data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +0 -152
- data/ext/rj_schema/rapidjson/doc/faq.md +0 -289
- data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +0 -290
- data/ext/rj_schema/rapidjson/doc/features.md +0 -104
- data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +0 -103
- data/ext/rj_schema/rapidjson/doc/internals.md +0 -368
- data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +0 -363
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
- data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +0 -119
- data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
- data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +0 -274
- data/ext/rj_schema/rapidjson/doc/misc/footer.html +0 -11
- data/ext/rj_schema/rapidjson/doc/misc/header.html +0 -24
- data/ext/rj_schema/rapidjson/doc/npm.md +0 -31
- data/ext/rj_schema/rapidjson/doc/performance.md +0 -26
- data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +0 -26
- data/ext/rj_schema/rapidjson/doc/pointer.md +0 -234
- data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +0 -234
- data/ext/rj_schema/rapidjson/doc/sax.md +0 -509
- data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +0 -487
- data/ext/rj_schema/rapidjson/doc/schema.md +0 -505
- data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +0 -237
- data/ext/rj_schema/rapidjson/doc/stream.md +0 -429
- data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +0 -429
- data/ext/rj_schema/rapidjson/doc/tutorial.md +0 -536
- data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +0 -534
- data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +0 -8
- data/ext/rj_schema/rapidjson/example/CMakeLists.txt +0 -45
- data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +0 -292
- data/ext/rj_schema/rapidjson/example/archiver/archiver.h +0 -145
- data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +0 -287
- data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +0 -67
- data/ext/rj_schema/rapidjson/example/condense/condense.cpp +0 -32
- data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +0 -135
- data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
- data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +0 -207
- data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
- data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +0 -105
- data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
- data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +0 -30
- data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
- data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
- data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +0 -173
- data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +0 -29
- data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
- data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +0 -42
- data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
- data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +0 -151
- data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +0 -284
- data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
- data/ext/rj_schema/rapidjson/include/rapidjson/document.h +0 -2648
- data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +0 -299
- data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +0 -716
- data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +0 -74
- data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +0 -161
- data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +0 -99
- data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +0 -104
- data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +0 -151
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +0 -308
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +0 -186
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +0 -55
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +0 -732
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +0 -231
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +0 -290
- data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +0 -46
- data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
- data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +0 -70
- data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +0 -71
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
- data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
- data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
- data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +0 -1357
- data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +0 -277
- data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +0 -630
- data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +0 -2230
- data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +0 -2494
- data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +0 -223
- data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +0 -121
- data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +0 -710
- data/ext/rj_schema/rapidjson/include_dirs.js +0 -2
- data/ext/rj_schema/rapidjson/library.json +0 -15
- data/ext/rj_schema/rapidjson/license.txt +0 -57
- data/ext/rj_schema/rapidjson/package.json +0 -24
- data/ext/rj_schema/rapidjson/rapidjson.autopkg +0 -77
- data/ext/rj_schema/rapidjson/readme.md +0 -160
- data/ext/rj_schema/rapidjson/readme.zh-cn.md +0 -152
- data/ext/rj_schema/rapidjson/test/CMakeLists.txt +0 -20
- data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +0 -28
- data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +0 -974
- data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +0 -24
- data/ext/rj_schema/rapidjson/test/perftest/perftest.h +0 -185
- data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +0 -166
- data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
- data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +0 -223
- data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +0 -92
- data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +0 -100
- data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +0 -138
- data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
- data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +0 -672
- data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +0 -98
- data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
- data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +0 -451
- data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +0 -112
- data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +0 -230
- data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
- data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +0 -160
- data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
- data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +0 -70
- data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
- data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +0 -1529
- data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +0 -373
- data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +0 -2190
- data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +0 -638
- data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +0 -2072
- data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +0 -219
- data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +0 -30
- data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
- data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +0 -132
- data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +0 -51
- data/ext/rj_schema/rapidjson/test/unittest/unittest.h +0 -140
- data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +0 -1851
- data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +0 -598
- data/ext/rj_schema/rapidjson/test/valgrind.supp +0 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -16
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +0 -141
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -202
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +0 -333
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -562
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3675
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1205
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2377
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -794
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1095
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -291
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2179
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -672
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -397
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -161
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -4399
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1847
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -94
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -39
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -279
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -511
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -91
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +0 -101
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -82
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -101
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -84
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -90
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -103
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -35
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -174
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -498
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -823
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -183
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1411
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1228
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -622
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -127
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -699
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -5648
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -708
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -424
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2644
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -669
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -180
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -291
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -310
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -322
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -220
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -112
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -310
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +0 -280
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -242
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +0 -2182
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +0 -1087
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +0 -502
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -294
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -250
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1444
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -510
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -993
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -232
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -263
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2236
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -358
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -58
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -206
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1238
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -731
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2554
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +0 -82
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -123
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -144
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -153
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -109
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -151
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -224
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -130
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -173
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -160
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1342
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -387
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1183
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1259
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -373
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -110
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -118
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5388
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1427
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -662
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -215
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -65
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1055
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1304
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1635
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -212
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -88
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -237
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -130
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -71
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -117
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -126
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -192
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -636
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -140
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -340
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1062
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -743
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -253
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -256
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -320
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -70
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7706
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -49
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -49
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -132
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -308
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -181
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -194
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1135
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
- data/ext/rj_schema/rapidjson/travis-doxygen.sh +0 -121
@@ -1,170 +0,0 @@
|
|
1
|
-
// JSON filterkey example which populates filtered SAX events into a Document.
|
2
|
-
|
3
|
-
// This example parses JSON text from stdin with validation.
|
4
|
-
// During parsing, specified key will be filtered using a SAX handler.
|
5
|
-
// And finally the filtered events are used to populate a Document.
|
6
|
-
// As an example, the document is written to standard output.
|
7
|
-
|
8
|
-
#include "rapidjson/document.h"
|
9
|
-
#include "rapidjson/writer.h"
|
10
|
-
#include "rapidjson/filereadstream.h"
|
11
|
-
#include "rapidjson/filewritestream.h"
|
12
|
-
#include "rapidjson/error/en.h"
|
13
|
-
#include <stack>
|
14
|
-
|
15
|
-
using namespace rapidjson;
|
16
|
-
|
17
|
-
// This handler forwards event into an output handler, with filtering the descendent events of specified key.
|
18
|
-
template <typename OutputHandler>
|
19
|
-
class FilterKeyHandler {
|
20
|
-
public:
|
21
|
-
typedef char Ch;
|
22
|
-
|
23
|
-
FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) :
|
24
|
-
outputHandler_(outputHandler), keyString_(keyString), keyLength_(keyLength), filterValueDepth_(), filteredKeyCount_()
|
25
|
-
{}
|
26
|
-
|
27
|
-
bool Null() { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Null() && EndValue(); }
|
28
|
-
bool Bool(bool b) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Bool(b) && EndValue(); }
|
29
|
-
bool Int(int i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int(i) && EndValue(); }
|
30
|
-
bool Uint(unsigned u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint(u) && EndValue(); }
|
31
|
-
bool Int64(int64_t i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int64(i) && EndValue(); }
|
32
|
-
bool Uint64(uint64_t u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint64(u) && EndValue(); }
|
33
|
-
bool Double(double d) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Double(d) && EndValue(); }
|
34
|
-
bool RawNumber(const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.RawNumber(str, len, copy) && EndValue(); }
|
35
|
-
bool String (const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.String (str, len, copy) && EndValue(); }
|
36
|
-
|
37
|
-
bool StartObject() {
|
38
|
-
if (filterValueDepth_ > 0) {
|
39
|
-
filterValueDepth_++;
|
40
|
-
return true;
|
41
|
-
}
|
42
|
-
else {
|
43
|
-
filteredKeyCount_.push(0);
|
44
|
-
return outputHandler_.StartObject();
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
bool Key(const Ch* str, SizeType len, bool copy) {
|
49
|
-
if (filterValueDepth_ > 0)
|
50
|
-
return true;
|
51
|
-
else if (len == keyLength_ && std::memcmp(str, keyString_, len) == 0) {
|
52
|
-
filterValueDepth_ = 1;
|
53
|
-
return true;
|
54
|
-
}
|
55
|
-
else {
|
56
|
-
++filteredKeyCount_.top();
|
57
|
-
return outputHandler_.Key(str, len, copy);
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
bool EndObject(SizeType) {
|
62
|
-
if (filterValueDepth_ > 0) {
|
63
|
-
filterValueDepth_--;
|
64
|
-
return EndValue();
|
65
|
-
}
|
66
|
-
else {
|
67
|
-
// Use our own filtered memberCount
|
68
|
-
SizeType memberCount = filteredKeyCount_.top();
|
69
|
-
filteredKeyCount_.pop();
|
70
|
-
return outputHandler_.EndObject(memberCount) && EndValue();
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
bool StartArray() {
|
75
|
-
if (filterValueDepth_ > 0) {
|
76
|
-
filterValueDepth_++;
|
77
|
-
return true;
|
78
|
-
}
|
79
|
-
else
|
80
|
-
return outputHandler_.StartArray();
|
81
|
-
}
|
82
|
-
|
83
|
-
bool EndArray(SizeType elementCount) {
|
84
|
-
if (filterValueDepth_ > 0) {
|
85
|
-
filterValueDepth_--;
|
86
|
-
return EndValue();
|
87
|
-
}
|
88
|
-
else
|
89
|
-
return outputHandler_.EndArray(elementCount) && EndValue();
|
90
|
-
}
|
91
|
-
|
92
|
-
private:
|
93
|
-
FilterKeyHandler(const FilterKeyHandler&);
|
94
|
-
FilterKeyHandler& operator=(const FilterKeyHandler&);
|
95
|
-
|
96
|
-
bool EndValue() {
|
97
|
-
if (filterValueDepth_ == 1) // Just at the end of value after filtered key
|
98
|
-
filterValueDepth_ = 0;
|
99
|
-
return true;
|
100
|
-
}
|
101
|
-
|
102
|
-
OutputHandler& outputHandler_;
|
103
|
-
const char* keyString_;
|
104
|
-
const SizeType keyLength_;
|
105
|
-
unsigned filterValueDepth_;
|
106
|
-
std::stack<SizeType> filteredKeyCount_;
|
107
|
-
};
|
108
|
-
|
109
|
-
// Implements a generator for Document::Populate()
|
110
|
-
template <typename InputStream>
|
111
|
-
class FilterKeyReader {
|
112
|
-
public:
|
113
|
-
typedef char Ch;
|
114
|
-
|
115
|
-
FilterKeyReader(InputStream& is, const Ch* keyString, SizeType keyLength) :
|
116
|
-
is_(is), keyString_(keyString), keyLength_(keyLength), parseResult_()
|
117
|
-
{}
|
118
|
-
|
119
|
-
// SAX event flow: reader -> filter -> handler
|
120
|
-
template <typename Handler>
|
121
|
-
bool operator()(Handler& handler) {
|
122
|
-
FilterKeyHandler<Handler> filter(handler, keyString_, keyLength_);
|
123
|
-
Reader reader;
|
124
|
-
parseResult_ = reader.Parse(is_, filter);
|
125
|
-
return parseResult_;
|
126
|
-
}
|
127
|
-
|
128
|
-
const ParseResult& GetParseResult() const { return parseResult_; }
|
129
|
-
|
130
|
-
private:
|
131
|
-
FilterKeyReader(const FilterKeyReader&);
|
132
|
-
FilterKeyReader& operator=(const FilterKeyReader&);
|
133
|
-
|
134
|
-
InputStream& is_;
|
135
|
-
const char* keyString_;
|
136
|
-
const SizeType keyLength_;
|
137
|
-
ParseResult parseResult_;
|
138
|
-
};
|
139
|
-
|
140
|
-
int main(int argc, char* argv[]) {
|
141
|
-
if (argc != 2) {
|
142
|
-
fprintf(stderr, "filterkeydom key < input.json > output.json\n");
|
143
|
-
return 1;
|
144
|
-
}
|
145
|
-
|
146
|
-
// Prepare input stream.
|
147
|
-
char readBuffer[65536];
|
148
|
-
FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
|
149
|
-
|
150
|
-
// Prepare Filter
|
151
|
-
FilterKeyReader<FileReadStream> reader(is, argv[1], static_cast<SizeType>(strlen(argv[1])));
|
152
|
-
|
153
|
-
// Populates the filtered events from reader
|
154
|
-
Document document;
|
155
|
-
document.Populate(reader);
|
156
|
-
ParseResult pr = reader.GetParseResult();
|
157
|
-
if (!pr) {
|
158
|
-
fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(pr.Offset()), GetParseError_En(pr.Code()));
|
159
|
-
return 1;
|
160
|
-
}
|
161
|
-
|
162
|
-
// Prepare JSON writer and output stream.
|
163
|
-
char writeBuffer[65536];
|
164
|
-
FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
|
165
|
-
Writer<FileWriteStream> writer(os);
|
166
|
-
|
167
|
-
// Write the document to standard output
|
168
|
-
document.Accept(writer);
|
169
|
-
return 0;
|
170
|
-
}
|
@@ -1,207 +0,0 @@
|
|
1
|
-
// JSON to JSONx conversion example, using SAX API.
|
2
|
-
// JSONx is an IBM standard format to represent JSON as XML.
|
3
|
-
// https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html
|
4
|
-
// This example parses JSON text from stdin with validation,
|
5
|
-
// and convert to JSONx format to stdout.
|
6
|
-
// Need compile with -D__STDC_FORMAT_MACROS for defining PRId64 and PRIu64 macros.
|
7
|
-
|
8
|
-
#include "rapidjson/reader.h"
|
9
|
-
#include "rapidjson/stringbuffer.h"
|
10
|
-
#include "rapidjson/filereadstream.h"
|
11
|
-
#include "rapidjson/filewritestream.h"
|
12
|
-
#include "rapidjson/error/en.h"
|
13
|
-
#include <cstdio>
|
14
|
-
|
15
|
-
using namespace rapidjson;
|
16
|
-
|
17
|
-
// For simplicity, this example only read/write in UTF-8 encoding
|
18
|
-
template <typename OutputStream>
|
19
|
-
class JsonxWriter {
|
20
|
-
public:
|
21
|
-
JsonxWriter(OutputStream& os) : os_(os), name_(), level_(0), hasName_(false) {
|
22
|
-
}
|
23
|
-
|
24
|
-
bool Null() {
|
25
|
-
return WriteStartElement("null", true);
|
26
|
-
}
|
27
|
-
|
28
|
-
bool Bool(bool b) {
|
29
|
-
return
|
30
|
-
WriteStartElement("boolean") &&
|
31
|
-
WriteString(b ? "true" : "false") &&
|
32
|
-
WriteEndElement("boolean");
|
33
|
-
}
|
34
|
-
|
35
|
-
bool Int(int i) {
|
36
|
-
char buffer[12];
|
37
|
-
return WriteNumberElement(buffer, sprintf(buffer, "%d", i));
|
38
|
-
}
|
39
|
-
|
40
|
-
bool Uint(unsigned i) {
|
41
|
-
char buffer[11];
|
42
|
-
return WriteNumberElement(buffer, sprintf(buffer, "%u", i));
|
43
|
-
}
|
44
|
-
|
45
|
-
bool Int64(int64_t i) {
|
46
|
-
char buffer[21];
|
47
|
-
return WriteNumberElement(buffer, sprintf(buffer, "%" PRId64, i));
|
48
|
-
}
|
49
|
-
|
50
|
-
bool Uint64(uint64_t i) {
|
51
|
-
char buffer[21];
|
52
|
-
return WriteNumberElement(buffer, sprintf(buffer, "%" PRIu64, i));
|
53
|
-
}
|
54
|
-
|
55
|
-
bool Double(double d) {
|
56
|
-
char buffer[30];
|
57
|
-
return WriteNumberElement(buffer, sprintf(buffer, "%.17g", d));
|
58
|
-
}
|
59
|
-
|
60
|
-
bool RawNumber(const char* str, SizeType length, bool) {
|
61
|
-
return
|
62
|
-
WriteStartElement("number") &&
|
63
|
-
WriteEscapedText(str, length) &&
|
64
|
-
WriteEndElement("number");
|
65
|
-
}
|
66
|
-
|
67
|
-
bool String(const char* str, SizeType length, bool) {
|
68
|
-
return
|
69
|
-
WriteStartElement("string") &&
|
70
|
-
WriteEscapedText(str, length) &&
|
71
|
-
WriteEndElement("string");
|
72
|
-
}
|
73
|
-
|
74
|
-
bool StartObject() {
|
75
|
-
return WriteStartElement("object");
|
76
|
-
}
|
77
|
-
|
78
|
-
bool Key(const char* str, SizeType length, bool) {
|
79
|
-
// backup key to name_
|
80
|
-
name_.Clear();
|
81
|
-
for (SizeType i = 0; i < length; i++)
|
82
|
-
name_.Put(str[i]);
|
83
|
-
hasName_ = true;
|
84
|
-
return true;
|
85
|
-
}
|
86
|
-
|
87
|
-
bool EndObject(SizeType) {
|
88
|
-
return WriteEndElement("object");
|
89
|
-
}
|
90
|
-
|
91
|
-
bool StartArray() {
|
92
|
-
return WriteStartElement("array");
|
93
|
-
}
|
94
|
-
|
95
|
-
bool EndArray(SizeType) {
|
96
|
-
return WriteEndElement("array");
|
97
|
-
}
|
98
|
-
|
99
|
-
private:
|
100
|
-
bool WriteString(const char* s) {
|
101
|
-
while (*s)
|
102
|
-
os_.Put(*s++);
|
103
|
-
return true;
|
104
|
-
}
|
105
|
-
|
106
|
-
bool WriteEscapedAttributeValue(const char* s, size_t length) {
|
107
|
-
for (size_t i = 0; i < length; i++) {
|
108
|
-
switch (s[i]) {
|
109
|
-
case '&': WriteString("&"); break;
|
110
|
-
case '<': WriteString("<"); break;
|
111
|
-
case '"': WriteString("""); break;
|
112
|
-
default: os_.Put(s[i]); break;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
return true;
|
116
|
-
}
|
117
|
-
|
118
|
-
bool WriteEscapedText(const char* s, size_t length) {
|
119
|
-
for (size_t i = 0; i < length; i++) {
|
120
|
-
switch (s[i]) {
|
121
|
-
case '&': WriteString("&"); break;
|
122
|
-
case '<': WriteString("<"); break;
|
123
|
-
default: os_.Put(s[i]); break;
|
124
|
-
}
|
125
|
-
}
|
126
|
-
return true;
|
127
|
-
}
|
128
|
-
|
129
|
-
bool WriteStartElement(const char* type, bool emptyElement = false) {
|
130
|
-
if (level_ == 0)
|
131
|
-
if (!WriteString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"))
|
132
|
-
return false;
|
133
|
-
|
134
|
-
if (!WriteString("<json:") || !WriteString(type))
|
135
|
-
return false;
|
136
|
-
|
137
|
-
// For root element, need to add declarations
|
138
|
-
if (level_ == 0) {
|
139
|
-
if (!WriteString(
|
140
|
-
" xsi:schemaLocation=\"http://www.datapower.com/schemas/json jsonx.xsd\""
|
141
|
-
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
|
142
|
-
" xmlns:json=\"http://www.ibm.com/xmlns/prod/2009/jsonx\""))
|
143
|
-
return false;
|
144
|
-
}
|
145
|
-
|
146
|
-
if (hasName_) {
|
147
|
-
hasName_ = false;
|
148
|
-
if (!WriteString(" name=\"") ||
|
149
|
-
!WriteEscapedAttributeValue(name_.GetString(), name_.GetSize()) ||
|
150
|
-
!WriteString("\""))
|
151
|
-
return false;
|
152
|
-
}
|
153
|
-
|
154
|
-
if (emptyElement)
|
155
|
-
return WriteString("/>");
|
156
|
-
else {
|
157
|
-
level_++;
|
158
|
-
return WriteString(">");
|
159
|
-
}
|
160
|
-
}
|
161
|
-
|
162
|
-
bool WriteEndElement(const char* type) {
|
163
|
-
if (!WriteString("</json:") ||
|
164
|
-
!WriteString(type) ||
|
165
|
-
!WriteString(">"))
|
166
|
-
return false;
|
167
|
-
|
168
|
-
// For the last end tag, flush the output stream.
|
169
|
-
if (--level_ == 0)
|
170
|
-
os_.Flush();
|
171
|
-
|
172
|
-
return true;
|
173
|
-
}
|
174
|
-
|
175
|
-
bool WriteNumberElement(const char* buffer, int length) {
|
176
|
-
if (!WriteStartElement("number"))
|
177
|
-
return false;
|
178
|
-
for (int j = 0; j < length; j++)
|
179
|
-
os_.Put(buffer[j]);
|
180
|
-
return WriteEndElement("number");
|
181
|
-
}
|
182
|
-
|
183
|
-
OutputStream& os_;
|
184
|
-
StringBuffer name_;
|
185
|
-
unsigned level_;
|
186
|
-
bool hasName_;
|
187
|
-
};
|
188
|
-
|
189
|
-
int main(int, char*[]) {
|
190
|
-
// Prepare JSON reader and input stream.
|
191
|
-
Reader reader;
|
192
|
-
char readBuffer[65536];
|
193
|
-
FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
|
194
|
-
|
195
|
-
// Prepare JSON writer and output stream.
|
196
|
-
char writeBuffer[65536];
|
197
|
-
FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
|
198
|
-
JsonxWriter<FileWriteStream> writer(os);
|
199
|
-
|
200
|
-
// JSON reader parse from the input stream and let writer generate the output.
|
201
|
-
if (!reader.Parse(is, writer)) {
|
202
|
-
fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode()));
|
203
|
-
return 1;
|
204
|
-
}
|
205
|
-
|
206
|
-
return 0;
|
207
|
-
}
|
@@ -1,350 +0,0 @@
|
|
1
|
-
#include "rapidjson/reader.h"
|
2
|
-
#include "rapidjson/document.h"
|
3
|
-
#include <iostream>
|
4
|
-
|
5
|
-
RAPIDJSON_DIAG_PUSH
|
6
|
-
#ifdef __GNUC__
|
7
|
-
RAPIDJSON_DIAG_OFF(effc++)
|
8
|
-
#endif
|
9
|
-
|
10
|
-
// This example demonstrates JSON token-by-token parsing with an API that is
|
11
|
-
// more direct; you don't need to design your logic around a handler object and
|
12
|
-
// callbacks. Instead, you retrieve values from the JSON stream by calling
|
13
|
-
// GetInt(), GetDouble(), GetString() and GetBool(), traverse into structures
|
14
|
-
// by calling EnterObject() and EnterArray(), and skip over unwanted data by
|
15
|
-
// calling SkipValue(). When you know your JSON's structure, this can be quite
|
16
|
-
// convenient.
|
17
|
-
//
|
18
|
-
// If you aren't sure of what's next in the JSON data, you can use PeekType() and
|
19
|
-
// PeekValue() to look ahead to the next object before reading it.
|
20
|
-
//
|
21
|
-
// If you call the wrong retrieval method--e.g. GetInt when the next JSON token is
|
22
|
-
// not an int, EnterObject or EnterArray when there isn't actually an object or array
|
23
|
-
// to read--the stream parsing will end immediately and no more data will be delivered.
|
24
|
-
//
|
25
|
-
// After calling EnterObject, you retrieve keys via NextObjectKey() and values via
|
26
|
-
// the normal getters. When NextObjectKey() returns null, you have exited the
|
27
|
-
// object, or you can call SkipObject() to skip to the end of the object
|
28
|
-
// immediately. If you fetch the entire object (i.e. NextObjectKey() returned null),
|
29
|
-
// you should not call SkipObject().
|
30
|
-
//
|
31
|
-
// After calling EnterArray(), you must alternate between calling NextArrayValue()
|
32
|
-
// to see if the array has more data, and then retrieving values via the normal
|
33
|
-
// getters. You can call SkipArray() to skip to the end of the array immediately.
|
34
|
-
// If you fetch the entire array (i.e. NextArrayValue() returned null),
|
35
|
-
// you should not call SkipArray().
|
36
|
-
//
|
37
|
-
// This parser uses in-situ strings, so the JSON buffer will be altered during the
|
38
|
-
// parse.
|
39
|
-
|
40
|
-
using namespace rapidjson;
|
41
|
-
|
42
|
-
|
43
|
-
class LookaheadParserHandler {
|
44
|
-
public:
|
45
|
-
bool Null() { st_ = kHasNull; v_.SetNull(); return true; }
|
46
|
-
bool Bool(bool b) { st_ = kHasBool; v_.SetBool(b); return true; }
|
47
|
-
bool Int(int i) { st_ = kHasNumber; v_.SetInt(i); return true; }
|
48
|
-
bool Uint(unsigned u) { st_ = kHasNumber; v_.SetUint(u); return true; }
|
49
|
-
bool Int64(int64_t i) { st_ = kHasNumber; v_.SetInt64(i); return true; }
|
50
|
-
bool Uint64(uint64_t u) { st_ = kHasNumber; v_.SetUint64(u); return true; }
|
51
|
-
bool Double(double d) { st_ = kHasNumber; v_.SetDouble(d); return true; }
|
52
|
-
bool RawNumber(const char*, SizeType, bool) { return false; }
|
53
|
-
bool String(const char* str, SizeType length, bool) { st_ = kHasString; v_.SetString(str, length); return true; }
|
54
|
-
bool StartObject() { st_ = kEnteringObject; return true; }
|
55
|
-
bool Key(const char* str, SizeType length, bool) { st_ = kHasKey; v_.SetString(str, length); return true; }
|
56
|
-
bool EndObject(SizeType) { st_ = kExitingObject; return true; }
|
57
|
-
bool StartArray() { st_ = kEnteringArray; return true; }
|
58
|
-
bool EndArray(SizeType) { st_ = kExitingArray; return true; }
|
59
|
-
|
60
|
-
protected:
|
61
|
-
LookaheadParserHandler(char* str);
|
62
|
-
void ParseNext();
|
63
|
-
|
64
|
-
protected:
|
65
|
-
enum LookaheadParsingState {
|
66
|
-
kInit,
|
67
|
-
kError,
|
68
|
-
kHasNull,
|
69
|
-
kHasBool,
|
70
|
-
kHasNumber,
|
71
|
-
kHasString,
|
72
|
-
kHasKey,
|
73
|
-
kEnteringObject,
|
74
|
-
kExitingObject,
|
75
|
-
kEnteringArray,
|
76
|
-
kExitingArray
|
77
|
-
};
|
78
|
-
|
79
|
-
Value v_;
|
80
|
-
LookaheadParsingState st_;
|
81
|
-
Reader r_;
|
82
|
-
InsituStringStream ss_;
|
83
|
-
|
84
|
-
static const int parseFlags = kParseDefaultFlags | kParseInsituFlag;
|
85
|
-
};
|
86
|
-
|
87
|
-
LookaheadParserHandler::LookaheadParserHandler(char* str) : v_(), st_(kInit), r_(), ss_(str) {
|
88
|
-
r_.IterativeParseInit();
|
89
|
-
ParseNext();
|
90
|
-
}
|
91
|
-
|
92
|
-
void LookaheadParserHandler::ParseNext() {
|
93
|
-
if (r_.HasParseError()) {
|
94
|
-
st_ = kError;
|
95
|
-
return;
|
96
|
-
}
|
97
|
-
|
98
|
-
r_.IterativeParseNext<parseFlags>(ss_, *this);
|
99
|
-
}
|
100
|
-
|
101
|
-
class LookaheadParser : protected LookaheadParserHandler {
|
102
|
-
public:
|
103
|
-
LookaheadParser(char* str) : LookaheadParserHandler(str) {}
|
104
|
-
|
105
|
-
bool EnterObject();
|
106
|
-
bool EnterArray();
|
107
|
-
const char* NextObjectKey();
|
108
|
-
bool NextArrayValue();
|
109
|
-
int GetInt();
|
110
|
-
double GetDouble();
|
111
|
-
const char* GetString();
|
112
|
-
bool GetBool();
|
113
|
-
void GetNull();
|
114
|
-
|
115
|
-
void SkipObject();
|
116
|
-
void SkipArray();
|
117
|
-
void SkipValue();
|
118
|
-
Value* PeekValue();
|
119
|
-
int PeekType(); // returns a rapidjson::Type, or -1 for no value (at end of object/array)
|
120
|
-
|
121
|
-
bool IsValid() { return st_ != kError; }
|
122
|
-
|
123
|
-
protected:
|
124
|
-
void SkipOut(int depth);
|
125
|
-
};
|
126
|
-
|
127
|
-
bool LookaheadParser::EnterObject() {
|
128
|
-
if (st_ != kEnteringObject) {
|
129
|
-
st_ = kError;
|
130
|
-
return false;
|
131
|
-
}
|
132
|
-
|
133
|
-
ParseNext();
|
134
|
-
return true;
|
135
|
-
}
|
136
|
-
|
137
|
-
bool LookaheadParser::EnterArray() {
|
138
|
-
if (st_ != kEnteringArray) {
|
139
|
-
st_ = kError;
|
140
|
-
return false;
|
141
|
-
}
|
142
|
-
|
143
|
-
ParseNext();
|
144
|
-
return true;
|
145
|
-
}
|
146
|
-
|
147
|
-
const char* LookaheadParser::NextObjectKey() {
|
148
|
-
if (st_ == kHasKey) {
|
149
|
-
const char* result = v_.GetString();
|
150
|
-
ParseNext();
|
151
|
-
return result;
|
152
|
-
}
|
153
|
-
|
154
|
-
if (st_ != kExitingObject) {
|
155
|
-
st_ = kError;
|
156
|
-
return 0;
|
157
|
-
}
|
158
|
-
|
159
|
-
ParseNext();
|
160
|
-
return 0;
|
161
|
-
}
|
162
|
-
|
163
|
-
bool LookaheadParser::NextArrayValue() {
|
164
|
-
if (st_ == kExitingArray) {
|
165
|
-
ParseNext();
|
166
|
-
return false;
|
167
|
-
}
|
168
|
-
|
169
|
-
if (st_ == kError || st_ == kExitingObject || st_ == kHasKey) {
|
170
|
-
st_ = kError;
|
171
|
-
return false;
|
172
|
-
}
|
173
|
-
|
174
|
-
return true;
|
175
|
-
}
|
176
|
-
|
177
|
-
int LookaheadParser::GetInt() {
|
178
|
-
if (st_ != kHasNumber || !v_.IsInt()) {
|
179
|
-
st_ = kError;
|
180
|
-
return 0;
|
181
|
-
}
|
182
|
-
|
183
|
-
int result = v_.GetInt();
|
184
|
-
ParseNext();
|
185
|
-
return result;
|
186
|
-
}
|
187
|
-
|
188
|
-
double LookaheadParser::GetDouble() {
|
189
|
-
if (st_ != kHasNumber) {
|
190
|
-
st_ = kError;
|
191
|
-
return 0.;
|
192
|
-
}
|
193
|
-
|
194
|
-
double result = v_.GetDouble();
|
195
|
-
ParseNext();
|
196
|
-
return result;
|
197
|
-
}
|
198
|
-
|
199
|
-
bool LookaheadParser::GetBool() {
|
200
|
-
if (st_ != kHasBool) {
|
201
|
-
st_ = kError;
|
202
|
-
return false;
|
203
|
-
}
|
204
|
-
|
205
|
-
bool result = v_.GetBool();
|
206
|
-
ParseNext();
|
207
|
-
return result;
|
208
|
-
}
|
209
|
-
|
210
|
-
void LookaheadParser::GetNull() {
|
211
|
-
if (st_ != kHasNull) {
|
212
|
-
st_ = kError;
|
213
|
-
return;
|
214
|
-
}
|
215
|
-
|
216
|
-
ParseNext();
|
217
|
-
}
|
218
|
-
|
219
|
-
const char* LookaheadParser::GetString() {
|
220
|
-
if (st_ != kHasString) {
|
221
|
-
st_ = kError;
|
222
|
-
return 0;
|
223
|
-
}
|
224
|
-
|
225
|
-
const char* result = v_.GetString();
|
226
|
-
ParseNext();
|
227
|
-
return result;
|
228
|
-
}
|
229
|
-
|
230
|
-
void LookaheadParser::SkipOut(int depth) {
|
231
|
-
do {
|
232
|
-
if (st_ == kEnteringArray || st_ == kEnteringObject) {
|
233
|
-
++depth;
|
234
|
-
}
|
235
|
-
else if (st_ == kExitingArray || st_ == kExitingObject) {
|
236
|
-
--depth;
|
237
|
-
}
|
238
|
-
else if (st_ == kError) {
|
239
|
-
return;
|
240
|
-
}
|
241
|
-
|
242
|
-
ParseNext();
|
243
|
-
}
|
244
|
-
while (depth > 0);
|
245
|
-
}
|
246
|
-
|
247
|
-
void LookaheadParser::SkipValue() {
|
248
|
-
SkipOut(0);
|
249
|
-
}
|
250
|
-
|
251
|
-
void LookaheadParser::SkipArray() {
|
252
|
-
SkipOut(1);
|
253
|
-
}
|
254
|
-
|
255
|
-
void LookaheadParser::SkipObject() {
|
256
|
-
SkipOut(1);
|
257
|
-
}
|
258
|
-
|
259
|
-
Value* LookaheadParser::PeekValue() {
|
260
|
-
if (st_ >= kHasNull && st_ <= kHasKey) {
|
261
|
-
return &v_;
|
262
|
-
}
|
263
|
-
|
264
|
-
return 0;
|
265
|
-
}
|
266
|
-
|
267
|
-
int LookaheadParser::PeekType() {
|
268
|
-
if (st_ >= kHasNull && st_ <= kHasKey) {
|
269
|
-
return v_.GetType();
|
270
|
-
}
|
271
|
-
|
272
|
-
if (st_ == kEnteringArray) {
|
273
|
-
return kArrayType;
|
274
|
-
}
|
275
|
-
|
276
|
-
if (st_ == kEnteringObject) {
|
277
|
-
return kObjectType;
|
278
|
-
}
|
279
|
-
|
280
|
-
return -1;
|
281
|
-
}
|
282
|
-
|
283
|
-
//-------------------------------------------------------------------------
|
284
|
-
|
285
|
-
int main() {
|
286
|
-
using namespace std;
|
287
|
-
|
288
|
-
char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null,"
|
289
|
-
"\"i\":123, \"pi\": 3.1416, \"a\":[-1, 2, 3, 4, \"array\", []], \"skipArrays\":[1, 2, [[[3]]]], "
|
290
|
-
"\"skipObject\":{ \"i\":0, \"t\":true, \"n\":null, \"d\":123.45 }, "
|
291
|
-
"\"skipNested\":[[[[{\"\":0}, {\"\":[-9.87]}]]], [], []], "
|
292
|
-
"\"skipString\":\"zzz\", \"reachedEnd\":null, \"t\":true }";
|
293
|
-
|
294
|
-
LookaheadParser r(json);
|
295
|
-
|
296
|
-
RAPIDJSON_ASSERT(r.PeekType() == kObjectType);
|
297
|
-
|
298
|
-
r.EnterObject();
|
299
|
-
while (const char* key = r.NextObjectKey()) {
|
300
|
-
if (0 == strcmp(key, "hello")) {
|
301
|
-
RAPIDJSON_ASSERT(r.PeekType() == kStringType);
|
302
|
-
cout << key << ":" << r.GetString() << endl;
|
303
|
-
}
|
304
|
-
else if (0 == strcmp(key, "t") || 0 == strcmp(key, "f")) {
|
305
|
-
RAPIDJSON_ASSERT(r.PeekType() == kTrueType || r.PeekType() == kFalseType);
|
306
|
-
cout << key << ":" << r.GetBool() << endl;
|
307
|
-
continue;
|
308
|
-
}
|
309
|
-
else if (0 == strcmp(key, "n")) {
|
310
|
-
RAPIDJSON_ASSERT(r.PeekType() == kNullType);
|
311
|
-
r.GetNull();
|
312
|
-
cout << key << endl;
|
313
|
-
continue;
|
314
|
-
}
|
315
|
-
else if (0 == strcmp(key, "pi")) {
|
316
|
-
RAPIDJSON_ASSERT(r.PeekType() == kNumberType);
|
317
|
-
cout << key << ":" << r.GetDouble() << endl;
|
318
|
-
continue;
|
319
|
-
}
|
320
|
-
else if (0 == strcmp(key, "a")) {
|
321
|
-
RAPIDJSON_ASSERT(r.PeekType() == kArrayType);
|
322
|
-
|
323
|
-
r.EnterArray();
|
324
|
-
|
325
|
-
cout << key << ":[ ";
|
326
|
-
while (r.NextArrayValue()) {
|
327
|
-
if (r.PeekType() == kNumberType) {
|
328
|
-
cout << r.GetDouble() << " ";
|
329
|
-
}
|
330
|
-
else if (r.PeekType() == kStringType) {
|
331
|
-
cout << r.GetString() << " ";
|
332
|
-
}
|
333
|
-
else {
|
334
|
-
r.SkipArray();
|
335
|
-
break;
|
336
|
-
}
|
337
|
-
}
|
338
|
-
|
339
|
-
cout << "]" << endl;
|
340
|
-
}
|
341
|
-
else {
|
342
|
-
cout << key << ":skipped" << endl;
|
343
|
-
r.SkipValue();
|
344
|
-
}
|
345
|
-
}
|
346
|
-
|
347
|
-
return 0;
|
348
|
-
}
|
349
|
-
|
350
|
-
RAPIDJSON_DIAG_POP
|