BloombergLP::baljsn::PrintUtil::printString

Encode the specified string value into JSON format and output the result to the specified stream.

Synopsis

Declared in <baljsn_printutil.h>

static
int
printString(
    std::ostream& stream,
    std::string_view const& value,
    EncoderOptions const* options = 0);

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streamoutput stream for JSON
valuestring value to encode
optionsencoding options; null uses defaults