encodeAny overloads
Declared in <baljsn_encoder.h>
Encode the specified any without instantiating templates at compile time. Return 0 on success, and a non-zero value otherwise.
int
encodeAny(
std::ostream& stream,
bdlar::AnyConstRef const& any,
EncoderOptions const& options);
» more...
Same as the preceding overload, accepting a nullable options pointer.
int
encodeAny(
std::ostream& stream,
bdlar::AnyConstRef const& any,
EncoderOptions const* options = 0);
» more...
Encode the specified any without instantiating templates at compile time. Return 0 on success, and a non-zero value otherwise.
int
encodeAny(
std::streambuf* streamBuf,
bdlar::AnyConstRef const& any,
EncoderOptions const& options);
» more...
Same as the preceding overload, accepting a nullable options pointer.
int
encodeAny(
std::streambuf* streamBuf,
bdlar::AnyConstRef const& any,
EncoderOptions const* options = 0);
» more...
Encode the specified value, of (template parameter) TYPE, in the JSON format using the specified options and output it onto the specified stream. Specifying a nullptr options is equivalent to passing a default-constructed DecoderOptions in options. TYPE shall be a bdlat-compatible choice, or array type, or a bdlat-compatible dynamic type referring to one of those types. Return 0 on success, and a non-zero value otherwise. Note that this function behaves identically to encode, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the baljsn package documentation for more details.
template<class TYPE>
int
encodeAny(
std::ostream& stream,
TYPE const& value,
EncoderOptions const& options);
» more...
Same as the preceding overload, accepting a nullable options pointer.
template<class TYPE>
int
encodeAny(
std::ostream& stream,
TYPE const& value,
EncoderOptions const* options = 0);
» more...
Encode the specified value, of (template parameter) TYPE, in the JSON format using the specified options and output it onto the specified streamBuf. Specifying a nullptr options is equivalent to passing a default-constructed DecoderOptions in options. TYPE shall be a bdlat-compatible sequence, choice, or array type, or a bdlat-compatible dynamic type referring to one of those types. Return 0 on success, and a non-zero value otherwise. Note that this function behaves identically to encode, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the baljsn package documentation for more details.
template<class TYPE>
int
encodeAny(
std::streambuf* streamBuf,
TYPE const& value,
EncoderOptions const& options);
» more...
Same as the preceding overload, accepting a nullable options pointer.
template<class TYPE>
int
encodeAny(
std::streambuf* streamBuf,
TYPE const& value,
EncoderOptions const* options = 0);
» more...