[#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;`

Encode any needed comma and member&hyphen;name tokens before a member value&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;_]#

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *formatter*
| JSON formatter that receives the encoded tokens
| *logStream*
| stream for human&hyphen;readable error descriptions
| *memberName*
| name of the member
| *isFirstMember*
| if `true`, omit a leading comma
| *formattingMode*
| formatting&hyphen;mode bit&hyphen;field for the member
| *isPrefixEmpty*
| receives whether no prefix token was encoded
|===


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