simdjson  3.1.8
Ridiculously Fast JSON
implementation.h
1 #ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H
2 #define SIMDJSON_FALLBACK_IMPLEMENTATION_H
3 
4 #include "simdjson/implementation.h"
5 
6 namespace simdjson {
7 namespace fallback {
8 
9 namespace {
10 using namespace simdjson;
11 using namespace simdjson::dom;
12 }
13 
17 class implementation final : public simdjson::implementation {
18 public:
19  simdjson_inline implementation() : simdjson::implementation(
20  "fallback",
21  "Generic fallback implementation",
22  0
23  ) {}
24  simdjson_warn_unused error_code create_dom_parser_implementation(
25  size_t capacity,
26  size_t max_length,
27  std::unique_ptr<internal::dom_parser_implementation>& dst
28  ) const noexcept final;
29  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
30  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
31 };
32 
33 } // namespace fallback
34 } // namespace simdjson
35 
36 #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H
An implementation of simdjson for a particular CPU architecture.
virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
Validate the UTF-8 string.
We want to support argument-dependent lookup (ADL).
error_code
All possible errors returned by simdjson.
Definition: error.h:17
std::string minify(T x)
Minifies a JSON element or document, printing the smallest possible valid JSON.