[#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 `<bdljsn_json.h>` Change the size of this `JsonArray` to the specified `count`. If `count < size()`, the elements in the range `[count .. size())]` are erased, and this function does not throw. If `count > size()`, the (newly created) elements in the range `[size() .. count)]` are default‐constructed `Json` objects, and if an exception is thrown, `*this` is unaffected. Throw `bsl::length_error` if `count > maxSize()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdljsn/JsonArray/resize-02.adoc[resize](std::size_t count); ---- [.small]#xref:BloombergLP/bdljsn/JsonArray/resize-02.adoc[_» more..._]# Change the size of this JsonArray to the specified `count`, inserting copies of the specified `json` at the end if `count > size()`. If `count < size()`, the elements in the range `[count .. size())]` are erased `json` is ignored, and this method does not throw. If `count > size()` and an exception is thrown, `*this` is unaffected. Throw `bsl::length_error` if `count > maxSize()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdljsn/JsonArray/resize-03.adoc[resize]( std::size_t count, xref:BloombergLP/bdljsn/Json.adoc[Json] const& json); ---- [.small]#xref:BloombergLP/bdljsn/JsonArray/resize-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#