simdjson  3.2.1
Ridiculously Fast JSON
implementation.h
1 #ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H
2 #define SIMDJSON_FALLBACK_IMPLEMENTATION_H
3 
4 #ifndef SIMDJSON_AMALGAMATED
5 #include "simdjson/implementation.h"
6 #endif // SIMDJSON_AMALGAMATED
7 
8 namespace simdjson {
9 namespace fallback {
10 
14 class implementation final : public simdjson::implementation {
15 public:
16  simdjson_inline implementation() : simdjson::implementation(
17  "fallback",
18  "Generic fallback implementation",
19  0
20  ) {}
21  simdjson_warn_unused error_code create_dom_parser_implementation(
22  size_t capacity,
23  size_t max_length,
24  std::unique_ptr<simdjson::internal::dom_parser_implementation>& dst
25  ) const noexcept final;
26  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
27  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
28 };
29 
30 } // namespace fallback
31 } // namespace simdjson
32 
33 #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H
An implementation of simdjson for a particular CPU architecture.
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
Validate the UTF-8 string.
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.