[#BloombergLP-bdljsn-JsonArray-resize-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonArray.adoc[JsonArray]::resize
:relfileprefix: ../../../
:mrdocs:

`resize` overloads

== Synopses

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

Change the size of this `JsonArray` to the specified `count`&period; If `count &lt; size()`, the elements in the range `&lsqb;count &period;&period; size())&rsqb;` are erased, and this function does not throw&period; If `count &gt; size()`, the (newly created) elements in the range `&lsqb;size() &period;&period; count)&rsqb;` are default&hyphen;constructed `Json` objects, and if an exception is thrown, `&ast;this` is unaffected&period; Throw `bsl&colon;&colon;length&lowbar;error` if `count &gt; maxSize()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdljsn/JsonArray/resize-02.adoc[resize](std::size&lowbar;t count);
----

[.small]#xref:BloombergLP/bdljsn/JsonArray/resize-02.adoc[_» more&period;&period;&period;_]#

Change the size of this JsonArray to the specified `count`, inserting copies of the specified `json` at the end if `count &gt; size()`&period; If `count &lt; size()`, the elements in the range `&lsqb;count &period;&period; size())&rsqb;` are erased `json` is ignored, and this method does not throw&period; If `count &gt; size()` and an exception is thrown, `&ast;this` is unaffected&period; Throw `bsl&colon;&colon;length&lowbar;error` if `count &gt; maxSize()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdljsn/JsonArray/resize-03.adoc[resize](
    std::size&lowbar;t count,
    xref:BloombergLP/bdljsn/Json.adoc[Json] const& json);
----

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


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