[#BloombergLP-baljsn-EncodeImplUtil_SelectionVisitor-operator_call]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/EncodeImplUtil_SelectionVisitor.adoc[EncodeImplUtil&lowbar;SelectionVisitor]::operator()
:relfileprefix: ../../../
:mrdocs:

Encode the JSON representation of the specified `selection`, having the name equal to the `name` attribute of the specified `selectionInfo` to the JSON `formatter` attribute of this object, according to the specified `formattingMode`&period; If the `isNextObjectFirst` attribute of this object is `true`, then the representation of the selection contains no leading sequence delimiter, and does contain such a delimiter otherwise&period; The `options` attribute of this object configures aspects of the JSON representation of the `selection`&period; If this operation is not successful, load an unspecified, human&hyphen;readable description of the error condition to the `logStream` attribute of this object&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined unless the `selection` satisfies both the static and dynamic requirements of the `bdlat` type&hyphen;category concept corresponding to the specified `category`&period; See the component&hyphen;level documentation of &lcub;`baljsn&lowbar;encoderoptions`&rcub; for a description of the effects, if any, of each option in the `options` on the JSON representation of the `selection`&period; See the package&hyphen;level documentation of &lcub;`bdlat`&rcub; for an introduction to the requirements of `bdlat` type&hyphen;category concepts&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    class SELECTION&lowbar;INFO&gt;
int
operator()(
    TYPE const& selection,
    SELECTION&lowbar;INFO const& selectionInfo);
----


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