[#BloombergLP-bdljsn-JsonArray-2constructor-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray]::JsonArray
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

Create an empty `JsonArray`&period;


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

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

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


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

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

Create an empty `JsonArray` using the specified `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/JsonArray/2constructor-03.adoc[JsonArray](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

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

Create a `JsonArray` by moving from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonArray/2constructor-09.adoc[JsonArray](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;JsonArray&gt;] original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

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

Create a `JsonArray` from the specified `elements`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonArray/2constructor-0c.adoc[JsonArray](
    std::initializer&lowbar;list&lt;Json&lowbar;Initializer&gt; elements,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/JsonArray/2constructor-002.adoc[JsonArray](
    xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

Create a `JsonArray` from the range `&lsqb;first, last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdljsn/JsonArray/2constructor-0a.adoc[JsonArray](
    t&lowbar;INPUT&lowbar;ITERATOR first,
    t&lowbar;INPUT&lowbar;ITERATOR last,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| source array
| *basicAllocator*
| memory allocator&semi; null uses the default
| *elements*
| initializer&hyphen;list of element values
| *first*
| beginning of the source range
| *last*
| end of the source range
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
