[#BloombergLP-bdljsn-Json-2constructor-086] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::Json :relfileprefix: ../../../ :mrdocs: Create a `Json` object having the type `bsl::string` and the same value as the specified `string` by moving (in constant time) the contents of `string` to the new `Json` object. Optionally specify the `basicAllocator` used to supply memory. If `basicAllocator` is not specified, the allocator associated with `string` is propagated for use in the newly‐created `Json` object. `string` is left in a valid but unspecified state. This function does not participate in overload resolution unless the specified `t_STRING_TYPE` is `bsl::string`. The behavior is undefined unless `string` 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> Json( xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef_Deduced<t_STRING_TYPE>] string, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0, void* = 0) requires bsl::is_same<t_STRING_TYPE, bsl::string>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#