encode overloads
Synopses
Declared in <baljsn_encodeimplutil.h>
Encode the JSON representation of value to jsonStream.
template<class TYPE>
static
int
encode(
std::ostream* jsonStream,
TYPE const& value,
EncoderOptions const& options = EncoderOptions());
Encode the JSON representation of value to jsonStream, logging errors to logStream.
template<class TYPE>
static
int
encode(
std::ostream* logStream,
std::ostream* jsonStream,
TYPE const& value,
EncoderOptions const& options = EncoderOptions());
Encode the JSON representation of value to formatter.
template<class TYPE>
static
int
encode(
bool* isValueEmpty,
FORMATTER* formatter,
std::ostream* logStream,
TYPE const& value,
FormattingMode formattingMode,
EncoderOptions const& options,
bool isFirstMember);
Return Value
0 on success, and a non‐zero value otherwise
Parameters
Name |
Description |
jsonStream |
stream that receives the JSON representation |
value |
value to encode |
options |
encoding options |
logStream |
stream for human‐readable error descriptions |
isValueEmpty |
receives whether the representation is empty |
formatter |
JSON formatter that receives the encoded tokens |
formattingMode |
formatting‐mode bit‐field for the value |
isFirstMember |
if |
Created with MrDocs