[#BloombergLP-baljsn-Decoder-decode-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/Decoder.adoc[Decoder]::decode
:relfileprefix: ../../../
:mrdocs:

`decode` overloads

== Synopses

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

Decode JSON from `stream` into `value` using default options&period;


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

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

Decode JSON from `streamBuf` into `value` using default options&period;


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

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

Decode JSON from `stream` into `value` using `options`&period;


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

[.small]#xref:BloombergLP/baljsn/Decoder/decode-0f.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/decode-03.adoc[decode](
    std::istream& stream,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const* options);
----

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

Decode JSON from `streamBuf` into `value` using `options`&period;


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

[.small]#xref:BloombergLP/baljsn/Decoder/decode-00.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/decode-0c.adoc[decode](
    std::streambuf* streamBuf,
    TYPE* value,
    xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const* options);
----

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

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| input stream supplying JSON
| *value*
| object to decode into
| *streamBuf*
| input buffer supplying JSON
| *options*
| decoding options
|===


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