Encode the specified value of (template parameter) TYPE into the specified stream. Return 0 on success, and a non‐zero value otherwise. Note that stream will be invalidated if the encoding failed.

Synopsis

Declared in <baljsn_encoder.h>

template<class TYPE>
int
encode(
    std::ostream& stream,
    TYPE const& value);

Description

DEPRECATED: Use the encode function passed a reference to a non‐modifiable EncoderOptions object instead.

Created with MrDocs