[#BloombergLP-bdljsn-Json-operator_assign-058] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::operator= :relfileprefix: ../../../ :mrdocs: 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`). == Synopsis Declared in `<bdljsn_json.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_STRING_TYPE> xref:BloombergLP/bdljsn/Json.adoc[Json]& 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]#Created with https://www.mrdocs.com[MrDocs]#