69 {
70 char filename[256];
71
72
73 for (int i = 1; i <= 33; i++) {
74 if (i == 1)
75 continue;
76 if (i == 18)
77 continue;
78
79 sprintf(filename, "fail%d.json", i);
80 size_t length;
81 char* json = ReadFile(filename, length);
82 if (!json) {
83 printf(
"jsonchecker file %s not found", filename);
85 continue;
86 }
87
88
92
93
96
97
104 break;
105 }
107
108 free(json);
109 }
110
111
112 for (int i = 1; i <= 3; i++) {
113 sprintf(filename, "pass%d.json", i);
114 size_t length;
115 char* json = ReadFile(filename, length);
116 if (!json) {
117 printf(
"jsonchecker file %s not found", filename);
118 continue;
119 }
120
121
123 document.
Parse(json);
125
126
129
130
137 break;
138 }
140
141 free(json);
142 }
143}
C-runtime library allocator.
A document for parsing JSON text as DOM.
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
bool IterativeParseNext(InputStream &is, Handler &handler)
Parse one token from JSON text.
void IterativeParseInit()
Initialize JSON text token-by-token parsing.
RAPIDJSON_FORCEINLINE bool IterativeParseComplete() const
Check if token-by-token parsing JSON text is complete.
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
LOGGING_API void printf(Category category, const char *format,...)
static const Segment ss(Segment::ss)
@ kParseDefaultFlags
Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.
@ kParseIterativeFlag
Iterative(constant complexity in terms of function call stack size) parsing.