[#BloombergLP-baljsn-Decoder-decode-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/Decoder.adoc[Decoder]::decode :relfileprefix: ../../../ :mrdocs: Decode an object of (template parameter) `TYPE` from the specified `stream` and load the result into the specified modifiable `value`. Return 0 on success, and a non‐zero value otherwise. Note that `stream` will be invalidated if the decoding fails. == Synopsis Declared in `<baljsn_decoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int decode( std::istream& stream, TYPE* value); ---- == Description DEPRECATED: Use the `decode` function passed a reference to a non‐modifiable `DecoderOptions` object instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#