[#BloombergLP-baljsn-SimpleFormatter-openArray-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/SimpleFormatter.adoc[SimpleFormatter]::openArray
:relfileprefix: ../../../
:mrdocs:

`openArray` overloads

== Synopses

Declared in `&lt;baljsn&lowbar;simpleformatter&period;h&gt;`

Print onto the stream supplied at construction the sequence of characters designating the start of an array (referred to as an &quot;array&quot; in JSON), preceded, if necessary, by a comma&period; Optionally specify `formattingStyle` denoting if the array being opened should be formatted as an empty array&period; If `formattingStyle` is not specified then the array being opened is formatted as a regular array having elements&period; The behavior is undefined unless `isNameNeeded()` is `false`&period; Note that the formatting (and as a consequence the `formattingStyle`) is relevant only if this formatter encodes in the pretty style and is ignored otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/baljsn/SimpleFormatter/openArray-08.adoc[openArray](xref:BloombergLP/baljsn/SimpleFormatter/ArrayFormattingStyle.adoc[ArrayFormattingStyle] formattingStyle = e&lowbar;REGULAR&lowbar;ARRAY&lowbar;FORMAT);
----

[.small]#xref:BloombergLP/baljsn/SimpleFormatter/openArray-08.adoc[_» more&period;&period;&period;_]#

Print onto the stream supplied at construction the sequence of characters designating the start of an array (referred to as an &quot;array&quot; in JSON) with the specified `name`, preceded, if necessary, by a comma&period; Optionally specify `formattingStyle` denoting if the array being opened should be formatted as an empty array&period; If `formattingStyle` is not specified then the array being opened is formatted as a regular array having elements&period; The behavior is undefined unless `isNameNeeded()` is `true`&period; Note that the formatting (and as a consequence the `formattingStyle`) is relevant only if this formatter encodes in the pretty style and is ignored otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/baljsn/SimpleFormatter/openArray-0e.adoc[openArray](
    std::string&lowbar;view const& name,
    xref:BloombergLP/baljsn/SimpleFormatter/ArrayFormattingStyle.adoc[ArrayFormattingStyle] formattingStyle = e&lowbar;REGULAR&lowbar;ARRAY&lowbar;FORMAT);
----

[.small]#xref:BloombergLP/baljsn/SimpleFormatter/openArray-0e.adoc[_» more&period;&period;&period;_]#


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