[#BloombergLP-balxml-Decoder-decodeAny-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Decoder.adoc[Decoder]::decodeAny
:relfileprefix: ../../../
:mrdocs:

Decode `object` from `stream` without instantiating templates&period;

== Synopsis

Declared in `&lt;balxml&lowbar;decoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::istream&
decodeAny(
    std::istream& stream,
    TYPE* object,
    char const* uri = 0);
----

== Description

Decode the specified `object` of parameterized `TYPE` from the specified input `stream`&period; Return a reference to the modifiable `stream`&period; If a decoding error is detected, `stream&period;fail()` will be `true` after this method returns&period; The (optionally) specified `uri` is used for identifying the input document in error messages&period; A compilation error will result unless `TYPE` conforms to the requirements of a `bdlat` sequence or choice, as described in `bdlat&lowbar;sequencefunctions` and `bdlat&lowbar;choicefunctions`&period; Note that this function behaves identically to `decode`, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime&semi; see the `balxml` package documentation for more details&period;

== Return Value

a reference to the modifiable `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| input stream providing XML data
| *object*
| object being decoded
| *uri*
| optional URI identifying the input document in error messages
|===


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