[#BloombergLP-bdljsn-Json-operator_assign-058]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::operator&equals;
:relfileprefix: ../../../
:mrdocs:

Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object&period; The contents of `rhs` are moved (in constant time) to this `Json` object if `allocator() &equals;&equals; rhs&period;allocator()`&semi; otherwise, they are copied&period; `rhs` is left in a valid but unspecified state&period; The value currently held by this object (if any) is destroyed if that value&apos;s type is not `bsl&colon;&colon;string`&period; This function does not participate in overload resolution unless the specified `t&lowbar;STRING&lowbar;TYPE` is `bsl&colon;&colon;string`&period; The behavior is undefined unless `rhs` is valid UTF&hyphen;8 (see `bdlde&colon;&colon;Utf8Util&colon;&colon;isValid`)&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;STRING&lowbar;TYPE&gt;
xref:BloombergLP/bdljsn/Json.adoc[Json]&
operator&equals;(xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;t&lowbar;STRING&lowbar;TYPE&gt;] rhs)
requires bsl&colon;&colon;is&lowbar;same&lt;t&lowbar;STRING&lowbar;TYPE, bsl&colon;&colon;string&gt;&colon;&colon;value;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
