[#BloombergLP-bdljsn-JsonNumber-2constructor-031] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonNumber.adoc[JsonNumber]::JsonNumber :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdljsn_jsonnumber.h>` Create a `JsonNumber` having the value "0". Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) used to supply memory. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/JsonNumber/2constructor-0fa.adoc[JsonNumber](); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0fa.adoc[_» more..._]# Create a `JsonNumber` by moving from the specified `original` object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d0.adoc[JsonNumber](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonNumber>] original) noexcept; ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d0.adoc[_» more..._]# Create a `JsonNumber` having the same value and allocator as `text`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e1.adoc[JsonNumber](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<bsl::string>] text); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e1.adoc[_» more..._]# Create a `JsonNumber` having the value "0" that uses the specified `allocator` to supply memory. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0c.adoc[JsonNumber](xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0c.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e1.adoc[JsonNumber]( xref:BloombergLP/bdldfp/Decimal64.adoc[bdldfp::Decimal64] value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e1.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d5.adoc[JsonNumber]( double value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d5.adoc[_» more..._]# Create a `JsonNumber` having the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-01.adoc[JsonNumber]( float value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-01.adoc[_» more..._]# Create a `JsonNumber` having the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0f6.adoc[JsonNumber]( int value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0f6.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e2.adoc[JsonNumber]( long value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e2.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-06.adoc[JsonNumber]( long long value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-06.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0ef.adoc[JsonNumber]( unsigned int value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0ef.adoc[_» more..._]# Create a `JsonNumber` from the specified unsigned long `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d9.adoc[JsonNumber]( unsigned long value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d9.adoc[_» more..._]# Create a `JsonNumber` having the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-055.adoc[JsonNumber]( unsigned long long value, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-055.adoc[_» more..._]# Create a `JsonNumber` by moving from `original` using `allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d4.adoc[JsonNumber]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<JsonNumber>] original, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d4.adoc[_» more..._]# Create a `JsonNumber` having the same value as the specified `text`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e6.adoc[JsonNumber]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<bsl::string>] text, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e6.adoc[_» more..._]# Create a `JsonNumber` having the same value as the specified `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/JsonNumber/2constructor-052.adoc[JsonNumber]( xref:BloombergLP/bdljsn/JsonNumber.adoc[JsonNumber] const& original, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-052.adoc[_» more..._]# Same as the related overload above for `JsonNumber`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-00.adoc[JsonNumber]( std::string_view const& text, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-00.adoc[_» more..._]# Create a `JsonNumber` having the value of the specified `text`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdljsn/JsonNumber/2constructor-03c.adoc[JsonNumber]( char const* text, xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-03c.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *original* | object to move from | *text* | JSON number text to move from | *allocator* | allocator used to supply memory | *value* | numeric value to store |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#