File: singleheadertest.cpp

package info (click to toggle)
simdjson 4.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,936 kB
  • sloc: cpp: 171,612; ansic: 19,122; sh: 1,126; python: 842; makefile: 47; ruby: 25; javascript: 13
file content (18 lines) | stat: -rw-r--r-- 450 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This file is not part of our main, regular tests.
#include "../singleheader/simdjson.h"
#include <iostream>

using namespace simdjson;

int main() {
  const char *filename = SIMDJSON_BENCHMARK_DATA_DIR "/twitter.json";
  dom::parser parser;
  dom::element doc;
  auto error = parser.load(filename).get(doc);
  if (error) {
    std::cerr << error << std::endl;
    return EXIT_FAILURE;
  }
  std::cout << doc << std::endl;
  return EXIT_SUCCESS;
}