2020-03-27 08:08:54 +08:00
|
|
|
// This file is not part of our main, regular tests.
|
2019-02-28 10:04:06 +08:00
|
|
|
#include "../singleheader/simdjson.h"
|
2019-06-27 07:48:51 +08:00
|
|
|
#include <iostream>
|
2019-02-28 10:04:06 +08:00
|
|
|
|
2019-07-03 04:24:56 +08:00
|
|
|
using namespace simdjson;
|
|
|
|
|
2019-02-28 10:04:06 +08:00
|
|
|
int main() {
|
2020-04-07 00:45:45 +08:00
|
|
|
const char *filename = SIMDJSON_BENCHMARK_DATA_DIR "/twitter.json";
|
2020-03-29 02:43:41 +08:00
|
|
|
dom::parser parser;
|
2020-06-22 06:26:44 +08:00
|
|
|
dom::element doc;
|
|
|
|
auto error = parser.load(filename).get(doc);
|
|
|
|
if (error) {
|
2020-03-28 00:22:46 +08:00
|
|
|
std::cerr << error << std::endl;
|
2019-03-03 06:18:45 +08:00
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
2020-06-22 06:26:44 +08:00
|
|
|
std::cout << doc << std::endl;
|
2019-02-28 10:04:06 +08:00
|
|
|
return EXIT_SUCCESS;
|
2019-05-10 05:59:51 +08:00
|
|
|
}
|