simdjson/singleheader/amalgamation_demo.cpp

18 lines
456 B
C++
Raw Normal View History

/* auto-generated on Tue 26 Feb 13:29:52 AEDT 2019. Do not edit! */
2018-12-31 10:50:10 +08:00
#include <iostream>
#include "simdjson.h"
#include "simdjson.cpp"
int main(int argc, char *argv[]) {
2019-02-23 04:42:44 +08:00
const char * filename = argv[1];
2018-12-31 10:50:10 +08:00
std::string_view p = get_corpus(filename);
ParsedJson pj = build_parsed_json(p); // do the parsing
if( ! pj.isValid() ) {
std::cout << "not valid" << std::endl;
} else {
std::cout << "valid" << std::endl;
}
return EXIT_SUCCESS;
}