[#BloombergLP-baljsn-Decoder-decodeAny-038]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/Decoder.adoc[Decoder]::decodeAny
:relfileprefix: ../../../
:mrdocs:

`decodeAny` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/baljsn/Decoder/decodeAny-0d9.adoc[decodeAny](
    std::istream& stream,
    xref:BloombergLP/bdlar/AnyRef.adoc[bdlar::AnyRef]* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const& options);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-0d9.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/baljsn/Decoder/decodeAny-0da.adoc[decodeAny](
    std::streambuf* streamBuf,
    xref:BloombergLP/bdlar/AnyRef.adoc[bdlar::AnyRef]* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const& options);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-0da.adoc[_» more&period;&period;&period;_]#

Decode into the specified `value`, of a (template parameter) `TYPE`, the JSON data read from the specified `stream` and using the specified `options`&period; `TYPE` shall be a `bdlat`&hyphen;compatible sequence, choice, or array type, or a `bdlat`&hyphen;compatible dynamic type referring to one of those types&period; Specifying a nullptr `options` is equivalent to passing a default&hyphen;constructed `DecoderOptions` in `options`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that this function behaves identically to `decode`, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime&semi; see the `baljsn` package documentation for more details&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/Decoder/decodeAny-0b.adoc[decodeAny](
    std::istream& stream,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const& options);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-0b.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, accepting a nullable `options` pointer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/Decoder/decodeAny-08.adoc[decodeAny](
    std::istream& stream,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-08.adoc[_» more&period;&period;&period;_]#

Decode into the specified `value`, of a (template parameter) `TYPE`, the JSON data read from the specified `streamBuf` and using the specified `options`&period; Specifying a nullptr `options` is equivalent to passing a default&hyphen;constructed `DecoderOptions` in `options`&period; `TYPE` shall be a `bdlat`&hyphen;compatible sequence, choice, or array type, or a `bdlat`&hyphen;compatible dynamic type referring to one of those types&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that this function behaves identically to `decode`, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime&semi; see the `baljsn` package documentation for more details&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/Decoder/decodeAny-02.adoc[decodeAny](
    std::streambuf* streamBuf,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const& options);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-02.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, accepting a nullable `options` pointer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
xref:BloombergLP/baljsn/Decoder/decodeAny-03c.adoc[decodeAny](
    std::streambuf* streamBuf,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const* options = 0);
----

[.small]#xref:BloombergLP/baljsn/Decoder/decodeAny-03c.adoc[_» more&period;&period;&period;_]#


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