[#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 `&lt;bdljsn&lowbar;jsonnumber&period;h&gt;`

Create a `JsonNumber` having the value &quot;0&quot;&period; Optionally specify an `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator` object) used to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonNumber/2constructor-0fa.adoc[JsonNumber]();
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0fa.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` by moving from the specified `original` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d0.adoc[JsonNumber](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;JsonNumber&gt;] original) noexcept;
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d0.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the same value and allocator as `text`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e1.adoc[JsonNumber](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;bsl::string&gt;] text);
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e1.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the value &quot;0&quot; that uses the specified `allocator` to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/JsonNumber/2constructor-0c.adoc[JsonNumber](xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e1.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d5.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the specified `value`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the specified `value`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0f6.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-05e2.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-06.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0ef.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` from the specified unsigned long `value`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d9.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the specified `value`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-055.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` by moving from `original` using `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d4.adoc[JsonNumber](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;JsonNumber&gt;] original,
    xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0d4.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the same value as the specified `text`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e6.adoc[JsonNumber](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;bsl::string&gt;] text,
    xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-0e6.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the same value as the specified `original`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-052.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `JsonNumber`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/JsonNumber/2constructor-00.adoc[JsonNumber](
    std::string&lowbar;view const& text,
    xref:BloombergLP/bdljsn/JsonNumber/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-00.adoc[_» more&period;&period;&period;_]#

Create a `JsonNumber` having the value of the specified `text`&period;


[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&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bdljsn/JsonNumber/2constructor-03c.adoc[_» more&period;&period;&period;_]#

== 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]#
