BloombergLP::baljsn::PrintUtil::printValue

Encode value into JSON and write it to stream.

Synopsis

Declared in <baljsn_printutil.h>

static
int
printValue(
    std::ostream& stream,
    bdldfp::Decimal64 value,
    EncoderOptions const* options = 0);

Description

Encode the specified value into JSON format and output the result to the specified stream using the optionally specified options. Return 0 on success and a non-zero value otherwise.

Return Value

0 on success, and a non-zero value otherwise

Parameters

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