[#BloombergLP-bdljsn-Json-operator_assign-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::operator= :relfileprefix: ../../../ :mrdocs: Assignment operators == Synopses Declared in `<bdljsn_json.h>` Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The value currently held by this variant is destroyed if that value's type is not the same as the type held by the `rhs` object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0ff.adoc[operator=](xref:BloombergLP/bdljsn/Json.adoc[Json] const& rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0ff.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-08b.adoc[operator=](xref:BloombergLP/bdldfp/Decimal64.adoc[bdldfp::Decimal64] rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-08b.adoc[_» more..._]# Assign to this object a value of type `bool` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `bool`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-02.adoc[operator=](bool rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-02.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-04.adoc[operator=](double rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-04.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0e.adoc[operator=](float rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0e.adoc[_» more..._]# Assign to this object a value of type `JsonNumber` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0b8.adoc[operator=](int rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0b8.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0b3.adoc[operator=](long rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0b3.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-080.adoc[operator=](long long rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-080.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0c.adoc[operator=](unsigned int rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0c.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-054.adoc[operator=](unsigned long rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-054.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-03e.adoc[operator=](unsigned long long rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-03e.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() == rhs.allocator()`; otherwise they are copied. `rhs` is left in a valid but unspecified state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-09.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Json>] rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-09.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() == rhs.allocator()`; otherwise, they are copied. `rhs` is left in a valid but unspecified state. The value currently held by this object (if any) is destroyed if that value's type is not `JsonArray`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0d.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonArray>] rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0d.adoc[_» more..._]# Assign to this object the singleton value of type `JsonNull`, and return a reference providing modifiable access to this object. `rhs` is left in a valid but unspecified state. The value currently held by this object (if any) is destroyed if that value's type is not `JsonNull`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0a.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonNull>]); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0a.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() == rhs.allocator()`; otherwise, they are copied. `rhs` is left in a valid but unspecified state. The value currently held by this object (if any) is destroyed if that value's type is not `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0bc.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonNumber>] rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0bc.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() == rhs.allocator()`; otherwise, they are copied. `rhs` is left in a valid but unspecified state. The value currently held by this object (if any) is destroyed if that value's type is not `JsonObject`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-050.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonObject>] rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-050.adoc[_» more..._]# Assign to this object a value of type `JsonArray` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `JsonArray`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0f9.adoc[operator=](xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray] const& rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0f9.adoc[_» more..._]# Assign to this object the singleton value of type `JsonNull`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `JsonNull`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-03f.adoc[operator=](xref:BloombergLP/bdljsn/JsonNull-0b.adoc[JsonNull] const&); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-03f.adoc[_» more..._]# Assign to this object a value of type `JsonNumber` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-00.adoc[operator=](xref:BloombergLP/bdljsn/JsonNumber.adoc[JsonNumber] const& rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-00.adoc[_» more..._]# Assign to this object a value of type `JsonObject` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `JsonObject`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-053.adoc[operator=](xref:BloombergLP/bdljsn/JsonObject.adoc[JsonObject] const& rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-053.adoc[_» more..._]# Same as the related overload above for `operator=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-01.adoc[operator=](std::string_view const& rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-01.adoc[_» more..._]# Assign to this object a value of type `bsl::string` initialized from the specified `rhs`, and return a reference providing modifiable access to this object. The value currently held by this object (if any) is destroyed if that value's type is not `bsl::string`. The behavior is undefined unless `rhs` is valid UTF‐8 (see `bdlde::Utf8Util::isValid`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-0b6.adoc[operator=](char const* rhs); ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-0b6.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() == rhs.allocator()`; otherwise, they are copied. `rhs` is left in a valid but unspecified state. The value currently held by this object (if any) is destroyed if that value's type is not `bsl::string`. This function does not participate in overload resolution unless the specified `t_STRING_TYPE` is `bsl::string`. The behavior is undefined unless `rhs` is valid UTF‐8 (see `bdlde::Utf8Util::isValid`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_STRING_TYPE> xref:BloombergLP/bdljsn/Json.adoc[Json]& xref:BloombergLP/bdljsn/Json/operator_assign-058.adoc[operator=](xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef_Deduced<t_STRING_TYPE>] rhs) requires bsl::is_same<t_STRING_TYPE, bsl::string>::value; ---- [.small]#xref:BloombergLP/bdljsn/Json/operator_assign-058.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#