Encode datum as JSON into result, using the specified options.
Declared in <baljsn_datumutil.h>
static
int
encode(
bsl::string* result,
bdld::Datum const& datum,
DatumEncoderOptions const& options);
Same as the preceding overload, using the specified options.
0 on success, a negative value on failure, or a positive value if strictTypes is enabled and an unsupported type is encoded
| Name | Description |
|---|---|
| result | receives the encoded JSON string |
| datum | Datum to encode |
| options | encoding options |