[#BloombergLP-baljsn-Decoder-decode-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/Decoder.adoc[Decoder]::decode :relfileprefix: ../../../ :mrdocs: Decode into the specified `value`, of a (template parameter) `TYPE`, the JSON data read from the specified `stream` and using the specified `options`. `TYPE` shall be a `bdeat`‐compatible sequence, choice, or array type, or a `bdeat`‐compatible dynamic type referring to one of those types. Specifying a nullptr `options` is equivalent to passing a default‐constructed DecoderOptions in `options`. Return 0 on success, and a non‐zero value otherwise. Note that this operation internally buffers input from `stream`, and if decoding is successful, will attempt to update the input position of `stream` to the last unprocessed byte. == Synopsis Declared in `<baljsn_decoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int decode( std::istream& stream, TYPE* value, xref:BloombergLP/baljsn/DecoderOptions.adoc[DecoderOptions] const& options); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#