85std::enable_if_t<!std::is_arithmetic_v<T> && !std::is_convertible_v<T&,
utils::impl::strong_typedef::StrongTypedefTag&>>
87 using Value =
typename StringBuilder::Value;
89 if constexpr (meta::kIsMap<T>) {
90 impl::WriteToStreamDict(value, sw);
91 }
else if constexpr (meta::kIsRange<T>) {
93 !std::is_same_v<T, boost::uuids::uuid>,
94 "Include <userver/formats/serialize/boost_uuid.hpp> to serialize 'boost::uuids::uuid"
97 !meta::kIsRecursiveRange<T>,
98 "Trying to log a recursive range, which can be dangerous. "
99 "(boost::filesystem::path?) Please implement WriteToStream "
102 impl::WriteToStreamArray(value, sw);
103 }
else if constexpr (
common::impl::kHasSerialize<Value, T>) {
105 !
sizeof(T) || impl::kIsSerializeAllowedInWriteToStream<T, StringBuilder>,
106 "SAX serialization falls back to Serialize call, which is not "
107 "allowed. Please implement WriteToStream for your type"
109 sw.WriteValue(Serialize(value,
serialize::
To<Value>{}));
111 static_assert(!
sizeof(T),
"Please implement WriteToStream or Serialize for your type");