9#include <userver/formats/json/string_builder_fwd.hpp>
10#include <userver/formats/json/value.hpp>
11#include <userver/formats/serialize/to.hpp>
12#include <userver/formats/serialize/write_to_stream.hpp>
13#include <userver/utils/fast_pimpl.hpp>
15USERVER_NAMESPACE_BEGIN
46 class ObjectGuard
final {
48 explicit ObjectGuard(StringBuilder& sw);
57 class ArrayGuard
final {
59 explicit ArrayGuard(StringBuilder& sw);
68 std::string_view GetStringView()
const;
71 void WriteString(std::string_view value);
72 void WriteBool(
bool value);
73 void WriteInt64(int64_t value);
74 void WriteUInt64(uint64_t value);
75 void WriteDouble(
double value);
78 void Key(std::string_view sw);
83 void WriteValue(
const Value& value);
87 utils::FastPimpl<Impl, 112, 8> impl_;
90void WriteToStream(
bool value, StringBuilder& sw);
91void WriteToStream(
long long value, StringBuilder& sw);
92void WriteToStream(
unsigned long long value, StringBuilder& sw);
93void WriteToStream(
int value, StringBuilder& sw);
94void WriteToStream(
unsigned value, StringBuilder& sw);
95void WriteToStream(
long value, StringBuilder& sw);
96void WriteToStream(
unsigned long value, StringBuilder& sw);
97void WriteToStream(
double value, StringBuilder& sw);
98void WriteToStream(
const char* value, StringBuilder& sw);
99void WriteToStream(std::string_view value, StringBuilder& sw);
100void WriteToStream(
const formats::
json::Value& value, StringBuilder& sw);
101void WriteToStream(
const std::string& value, StringBuilder& sw);
103void WriteToStream(std::chrono::system_clock::time_point tp, StringBuilder& sw);