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

Return a theoretical upper bound on this array&apos;s maximum size&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::size&lowbar;t
maxSize() const noexcept;
----

== Description

Return a theoretical upper bound on the largest number of elements that this `JsonArray` could possibly hold&period; Requests to create a `JsonArray` longer than this number of elements are guaranteed to raise a `bsl&colon;&colon;length&lowbar;error` exception&period; Note that there is no guarantee that the `JsonArray` can successfully grow to the returned size, or even close to that size, without running out of resources&period;

== Return Value

theoretical upper bound on this array&apos;s maximum size


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