Decode JSON from stream into value using default options.
Synopsis
Declared in <baljsn_decoder.h>
template<class TYPE>
int
decode(
std::istream& stream,
TYPE* value);
Description
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.
DEPRECATED: Use the decode function passed a reference to a non‐modifiable DecoderOptions object instead.
Return Value
0 on success, and a non‐zero value otherwise
Parameters
Name |
Description |
stream |
input stream supplying JSON |
value |
object to decode into |
Created with MrDocs