Skip to content

Commit 560f074

Browse files
committed
Update amalgamated headers
1 parent 910f272 commit 560f074

3 files changed

Lines changed: 1965 additions & 1634 deletions

File tree

singleheader/amalgamation_demo.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Sun Feb 2 15:10:09 PST 2020. Do not edit! */
1+
/* auto-generated on Sat Feb 22 10:41:58 PST 2020. Do not edit! */
22

33
#include <iostream>
44
#include "simdjson.h"
@@ -9,11 +9,11 @@ int main(int argc, char *argv[]) {
99
}
1010
const char * filename = argv[1];
1111
simdjson::padded_string p = simdjson::get_corpus(filename);
12-
simdjson::ParsedJson pj = simdjson::build_parsed_json(p); // do the parsing
13-
if( ! pj.is_valid() ) {
14-
std::cout << "build_parsed_json not valid" << std::endl;
12+
auto [doc, error] = simdjson::document::parse(p); // do the parsing
13+
if (error) {
14+
std::cout << "document::parse not valid" << std::endl;
1515
} else {
16-
std::cout << "build_parsed_json valid" << std::endl;
16+
std::cout << "document::parse valid" << std::endl;
1717
}
1818
if(argc == 2) {
1919
return EXIT_SUCCESS;
@@ -22,15 +22,15 @@ int main(int argc, char *argv[]) {
2222
//JsonStream
2323
const char * filename2 = argv[2];
2424
simdjson::padded_string p2 = simdjson::get_corpus(filename2);
25-
simdjson::ParsedJson pj2;
25+
simdjson::document::parser parser;
2626
simdjson::JsonStream js{p2};
2727
int parse_res = simdjson::SUCCESS_AND_HAS_MORE;
2828

2929
while (parse_res == simdjson::SUCCESS_AND_HAS_MORE) {
30-
parse_res = js.json_parse(pj2);
30+
parse_res = js.json_parse(parser);
3131
}
3232

33-
if( ! pj2.is_valid()) {
33+
if( ! parser.is_valid()) {
3434
std::cout << "JsonStream not valid" << std::endl;
3535
} else {
3636
std::cout << "JsonStream valid" << std::endl;

0 commit comments

Comments
 (0)