[#BloombergLP-baljsn-EncodeImplUtil-encodeMember-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/EncodeImplUtil.adoc[EncodeImplUtil]::encodeMember
:relfileprefix: ../../../
:mrdocs:

`encodeMember` overloads

== Synopses

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

Encode the JSON representation of object `member` named `memberName`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMember-00.adoc[encodeMember](
    bool* isMemberEmpty,
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;] const& member,
    xref:BloombergLP/baljsn/EncodeImplUtil/FormattingMode.adoc[FormattingMode] formattingMode,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const& options,
    bool isFirstMember,
    xref:BloombergLP/bdlat_TypeCategory/Array.adoc[bdlat&lowbar;TypeCategory::Array] category);
----

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

Same as the preceding `encodeMember` overload for the specified `category`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMember-03.adoc[encodeMember](
    bool* isMemberEmpty,
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    TYPE const& member,
    xref:BloombergLP/baljsn/EncodeImplUtil/FormattingMode.adoc[FormattingMode] formattingMode,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const& options,
    bool isFirstMember,
    xref:BloombergLP/bdlat_TypeCategory/Array.adoc[bdlat&lowbar;TypeCategory::Array] category);
----

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

Same as the preceding `encodeMember` overload for the specified `category`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    class OTHER&lowbar;CATEGORY&gt;
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/encodeMember-0e.adoc[encodeMember](
    bool* isMemberEmpty,
    FORMATTER* formatter,
    std::ostream* logStream,
    std::string&lowbar;view const& memberName,
    TYPE const& member,
    xref:BloombergLP/baljsn/EncodeImplUtil/FormattingMode.adoc[FormattingMode] formattingMode,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const& options,
    bool isFirstMember,
    OTHER&lowbar;CATEGORY category);
----

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

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *isMemberEmpty*
| receives whether the member is empty
| *formatter*
| JSON formatter that receives the encoded tokens
| *logStream*
| stream for human&hyphen;readable error descriptions
| *memberName*
| name of the member to encode
| *member*
| member value to encode
| *formattingMode*
| formatting&hyphen;mode bit&hyphen;field for the member
| *options*
| encoding options
| *isFirstMember*
| if `true`, omit a leading sequence delimiter
| *category*
| `bdlat` Array type&hyphen;category tag
|===


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