[#BloombergLP-bdljsn-JsonNumber-2constructor-0e6] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonNumber.adoc[JsonNumber]::JsonNumber :relfileprefix: ../../../ :mrdocs: Create a `JsonNumber` object having the same value as the specified `text`, using the specified `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory. The allocator of the `text` string remains unchanged. If the `text` and the newly created object have the same allocator then the contents of `text` string becomes unspecified but valid, and no exceptions will be thrown; otherwise the `text` string is unchanged and an exception may be thrown. The behavior is undefined unless `isValidNumber(text)` is `true`. See {JSON Textual Specification}. == Synopsis Declared in `<bdljsn_jsonnumber.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit JsonNumber( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<bsl::string>] text, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#