65 using ContainerType = Value;
74 using Builder = ValueBuilder;
79 Value(
const Value&) =
default;
80 Value(Value&&)
noexcept;
82 Value& operator=(
const Value&) & =
default;
83 Value& operator=(Value&&)
noexcept;
86 Value& operator=(T&&) && {
89 "You're assigning to a temporary formats::json::Value! Use "
90 "formats::json::ValueBuilder for data modifications."
112 const_iterator
end()
const;
120 const_reverse_iterator
rend()
const;
134 bool operator!=(
const Value& other)
const;
184 template <
typename T>
190 template <
typename T,
typename First,
typename... Rest>
191 auto As(First&& default_arg, Rest&&... more_default_args)
const;
196 template <
typename T>
201 template <
typename T>
206 template <
typename T,
typename First,
typename... Rest>
207 T
ConvertTo(First&& default_arg, Rest&&... more_default_args)
const;
253 struct EmplaceEnabler {
254 explicit EmplaceEnabler() =
default;
257 class LazyDetachedPath;
263 const impl::VersionedValuePtr& root,
264 const impl::Value* root_ptr_for_path,
265 const impl::Value* value_ptr,
271 const impl::VersionedValuePtr& root,
272 impl::Value* root_ptr_for_path,
273 LazyDetachedPath&& lazy_detached_path
278 explicit Value(impl::VersionedValuePtr root)
noexcept;
280 bool IsUniqueReference()
const;
281 void EnsureNotMissing()
const;
282 const impl::Value& GetNative()
const;
283 impl::Value& GetNative();
284 void SetNative(impl::Value&);
285 int GetExtendedType()
const;
287 impl::VersionedValuePtr holder_{};
288 impl::Value* root_ptr_for_path_{
nullptr};
289 impl::Value* value_ptr_{
nullptr};
298 class LazyDetachedPath
final {
300 LazyDetachedPath()
noexcept;
301 LazyDetachedPath(impl::Value* parent_value_ptr,
int parent_depth, std::string_view key);
303 LazyDetachedPath(
const LazyDetachedPath&);
304 LazyDetachedPath(LazyDetachedPath&&)
noexcept;
305 LazyDetachedPath& operator=(
const LazyDetachedPath&);
306 LazyDetachedPath& operator=(LazyDetachedPath&&)
noexcept;
308 std::string Get(
const impl::Value* root)
const;
309 LazyDetachedPath Chain(std::string_view key)
const;
312 impl::Value* parent_value_ptr_{
nullptr};
313 int parent_depth_{0};
314 std::string virtual_path_{};
317 LazyDetachedPath lazy_detached_path_;
320 friend class Iterator;
321 friend class ValueBuilder;
322 friend class StringBuilder;
324 friend class impl::InlineObjectBuilder;
325 friend class impl::InlineArrayBuilder;
326 friend class impl::MutableValueWrapper;
327 friend class parser::JsonValueParser;
328 friend class impl::StringBuffer;
330 friend bool Parse(
const Value& value,
parse::
To<
bool>);
331 friend std::int64_t Parse(
const Value& value,
parse::
To<std::int64_t>);
332 friend std::uint64_t Parse(
const Value& value,
parse::
To<std::uint64_t>);
333 friend double Parse(
const Value& value,
parse::
To<
double>);
334 friend std::string Parse(
const Value& value,
parse::
To<std::string>);