Create a JsonNumber having the same value as the specified text.
Declared in <bdljsn_jsonnumber.h>
explicit
JsonNumber(
bslmf::MovableRef<bsl::string> text,
allocator_type const& allocator);
Use 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}.
| Name | Description |
|---|---|
| text | JSON number text to move from |
| allocator | allocator used to supply memory |