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 value as JSON onto stream using options without instantiating templates at compile time.
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 value as JSON onto streamBuf using options without instantiating templates at compile time.
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...
0 on success, and a non-zero value otherwise
| Name | Description |
|---|---|
| stream | output stream for JSON |
| any | type-erased value to encode |
| options | encoding options |
| streamBuf | output buffer for JSON |
| value | value to encode |