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

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

== Synopsis

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

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

== Description

Create a `JsonArray` and insert (in order) each `Json` object in the range starting at the specified `first` element, and ending immediately before the specified `last` element&period; Optionally specify `basicAllocator` used to supply memory&period; If `basicAllocator` is not specified, the currently installed default allocator is used&period; Throw `bsl&colon;&colon;length&lowbar;error` if the number of elements in `&lsqb;first &period;&period; last)&rsqb;` exceeds the value returned by the method `maxSize`&period; The (template parameter) type `t&lowbar;INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the c&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb;providing access to values of a type convertible to `Json`, and `Json` must be `emplace&hyphen;constructible` form `&ast;i`, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;`&period; The behavior is undefined unless `first` and `last` refer to a range of valid values where `first` is at a position at or before `last`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *first*
| beginning of the source range
| *last*
| end of the source range
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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