Use new simd library for scanning string literals
This commit is contained in:
32
src/test.cpp
32
src/test.cpp
@@ -2,6 +2,7 @@
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
@@ -119,32 +120,11 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const std::string json = R"({
|
||||
"a number": 12345,
|
||||
"true": true,
|
||||
"false": false,
|
||||
"null": null,
|
||||
"glossary": {
|
||||
"title": "example glossary",
|
||||
"GlossDiv": {
|
||||
"title": "S",
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})";
|
||||
const std::string json = []() {
|
||||
std::ifstream infile{"test.json"};
|
||||
return std::string{std::istreambuf_iterator<char>(infile),
|
||||
std::istreambuf_iterator<char>()};
|
||||
}();
|
||||
|
||||
void testStreaming(std::string const &json) {
|
||||
SerializeState streaming;
|
||||
|
||||
Reference in New Issue
Block a user