BloombergLP::baljsn::JsonFormatter_Util::setTemporalValueToJson

Load the JSON representation of a temporal value into json.

Synopsis

Declared in <baljsn_jsonformatter.h>

template<class TYPE>
static
int
setTemporalValueToJson(
    bdljsn::Json* json,
    TYPE const& value,
    EncoderOptions const* options);

Description

Optionally use the specified options (notably datetimeFractionalSecondPrecision). Return 0 on success and a non-zero value otherwise.

Return Value

0 on success and a non-zero value otherwise

Parameters

NameDescription
jsonJSON object to receive the encoded value
valuetemporal value to encode
optionsoptional encoding options; null uses defaults