[#BloombergLP-baljsn-DatumUtil-decode-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/DatumUtil.adoc[DatumUtil]::decode
:relfileprefix: ../../../
:mrdocs:

Decode `json` into `result`, writing errors to `errorStream`, using `options`&period;

== Synopsis

Declared in `&lt;baljsn&lowbar;datumutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
decode(
    xref:BloombergLP/bdld/ManagedDatum.adoc[bdld::ManagedDatum]* result,
    std::ostream* errorStream,
    std::string&lowbar;view const& json,
    xref:BloombergLP/baljsn/DatumDecoderOptions.adoc[DatumDecoderOptions] const& options);
----

== Description

Same as the preceding overload, using the specified `options`&period;

== Return Value

0 on success, and a negative value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| receives the decoded `Datum`
| *errorStream*
| optional stream for parse&hyphen;error descriptions
| *json*
| JSON text to decode
| *options*
| decoding options
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
