[#BloombergLP-baljsn-Encoder-encodeAny-0df]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/Encoder.adoc[Encoder]::encodeAny
:relfileprefix: ../../../
:mrdocs:

Encode the specified `any` without instantiating templates at compile time&period; Return 0 on success, and a non&hyphen;zero value otherwise&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
encodeAny(
    std::streambuf* streamBuf,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& any,
    xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions] const& options);
----


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