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

Change the size of this array to `count`, filling with `json` as needed&period;

== Synopsis

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

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

== Description

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;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *count*
| new number of elements
| *json*
| fill value for new elements
|===


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