[#BloombergLP-baljsn-EncodeImplUtil-encodeMemberPrefix-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/EncodeImplUtil.adoc[EncodeImplUtil]::encodeMemberPrefix
:relfileprefix: ../../../
:mrdocs:

`encodeMemberPrefix` overloads

== Synopses

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

If the specified `isFirstMember` flag is `false`, encode a &quot;comma&quot; JSON token to the specified `formatter`, and do not encode a &quot;comma&quot; JSON token otherwise&period; If the specified `formattingMode` does not have the `bdlat&lowbar;FormattingMode&colon;&colon;e&lowbar;UNTAGGED` bit set, encode a JSON &quot;string&quot; token having the specified `memberName` contents, and encode a JSON &quot;colon&quot; token after the string, and do not encode these tokens otherwise&period; If this operation is not successful, load an unspecified, human&hyphen;readable description of the error condition to the specified `logStream`&period; Optionally specify `isPrefixEmpty`&period; If this operation encodes a token to the formatter, load the value `false` to `isPrefixEmpty` if specified, and the value `true` otherwise&period; Return 0 on success, and a non&hyphen;zero value otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-040.adoc[encodeMemberPrefix](
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    bool isFirstMember);
----

[.small]#xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-040.adoc[_» more&period;&period;&period;_]#

Same as the preceding `encodeMemberPrefix` overload, using the specified `formattingMode`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-05.adoc[encodeMemberPrefix](
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    xref:BloombergLP/baljsn/EncodeImplUtil/FormattingMode.adoc[FormattingMode] formattingMode,
    bool isFirstMember);
----

[.small]#xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-05.adoc[_» more&period;&period;&period;_]#

Same as the preceding `encodeMemberPrefix` overload, optionally loading `isPrefixEmpty`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-04c.adoc[encodeMemberPrefix](
    bool* isPrefixEmpty,
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    xref:BloombergLP/baljsn/EncodeImplUtil/FormattingMode.adoc[FormattingMode] formattingMode,
    bool isFirstMember);
----

[.small]#xref:BloombergLP/baljsn/EncodeImplUtil/encodeMemberPrefix-04c.adoc[_» more&period;&period;&period;_]#


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