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;
181 template <
typename T>
187 template <
typename T,
typename First,
typename... Rest>
188 auto As(First&& default_arg, Rest&&... more_default_args)
const;
193 template <
typename T>
198 template <
typename T>
203 template <
typename T,
typename First,
typename... Rest>
204 T
ConvertTo(First&& default_arg, Rest&&... more_default_args)
const;
250 struct EmplaceEnabler {
251 explicit EmplaceEnabler() =
default;
254 class LazyDetachedPath;
260 const impl::VersionedValuePtr& root,
261 const impl::Value* root_ptr_for_path,
262 const impl::Value* value_ptr,
268 const impl::VersionedValuePtr& root,
269 impl::Value* root_ptr_for_path,
270 LazyDetachedPath&& lazy_detached_path
275 explicit Value(impl::VersionedValuePtr root)
noexcept;
277 bool IsUniqueReference()
const;
278 void EnsureNotMissing()
const;
279 const impl::Value& GetNative()
const;
280 impl::Value& GetNative();
281 void SetNative(impl::Value&);
282 int GetExtendedType()
const;
284 impl::VersionedValuePtr holder_{};
285 impl::Value* root_ptr_for_path_{
nullptr};
286 impl::Value* value_ptr_{
nullptr};
295 class LazyDetachedPath
final {
297 LazyDetachedPath()
noexcept;
298 LazyDetachedPath(impl::Value* parent_value_ptr,
int parent_depth, std::string_view key);
300 LazyDetachedPath(
const LazyDetachedPath&);
301 LazyDetachedPath(LazyDetachedPath&&)
noexcept;
302 LazyDetachedPath& operator=(
const LazyDetachedPath&);
303 LazyDetachedPath& operator=(LazyDetachedPath&&)
noexcept;
305 std::string Get(
const impl::Value* root)
const;
306 LazyDetachedPath Chain(std::string_view key)
const;
309 impl::Value* parent_value_ptr_{
nullptr};
310 int parent_depth_{0};
311 std::string virtual_path_{};
314 LazyDetachedPath lazy_detached_path_;
317 friend class Iterator;
318 friend class ValueBuilder;
319 friend class StringBuilder;
321 friend class impl::InlineObjectBuilder;
322 friend class impl::InlineArrayBuilder;
323 friend class impl::MutableValueWrapper;
324 friend class parser::JsonValueParser;
325 friend class impl::StringBuffer;
327 friend bool Parse(
const Value& value,
parse::
To<
bool>);
328 friend std::int64_t Parse(
const Value& value,
parse::
To<std::int64_t>);
329 friend std::uint64_t Parse(
const Value& value,
parse::
To<std::uint64_t>);
330 friend double Parse(
const Value& value,
parse::
To<
double>);
331 friend std::string Parse(
const Value& value,
parse::
To<std::string>);