1#ifndef SIMDJSON_ONDEMAND_H
2#define SIMDJSON_ONDEMAND_H
4#include "simdjson/builtin/ondemand.h"
10 namespace ondemand = builtin::ondemand;
14 namespace builder = builtin::builder;
16#if SIMDJSON_STATIC_REFLECTION
22 requires(!std::same_as<T, builtin::ondemand::document> &&
23 !std::same_as<T, builtin::ondemand::value> &&
24 !std::same_as<T, builtin::ondemand::object> &&
25 !std::same_as<T, builtin::ondemand::array>)
27 builder::string_builder str_builder;
28 append(str_builder, obj);
29 std::string_view view;
30 if (str_builder.view().get(view) ==
SUCCESS) {
31 return std::string(view);
The top level simdjson namespace, containing everything the library provides.
simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
Create a string-view instance out of a document instance.