| 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 | } |
nothing calls this directly
no test coverage detected