[#BloombergLP-bdljsn-Json-visit-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::visit
:relfileprefix: ../../../
:mrdocs:

Return the result (having `RETURN&lowbar;TYPE`) of invoking the specified `visitor` (callable) object on this `Json` object&period; `visitor` must be callable as if it provides the following overloads of `operator()`&colon; &grave; RETURN&lowbar;TYPE operator()(const JsonObject&amp; object )&semi; RETURN&lowbar;TYPE operator()(const JsonArray&amp; array )&semi; RETURN&lowbar;TYPE operator()(const bsl&colon;&colon;string&amp; string )&semi; RETURN&lowbar;TYPE operator()(const JsonNumber&amp; number )&semi; RETURN&lowbar;TYPE operator()(const bool&amp; boolean)&semi; RETURN&lowbar;TYPE operator()(const JsonNull&amp; null )&semi; &grave; The overload corresponding to the current `type()` of this `Json` object is invoked&period; For C&plus;&plus;03 `visitor` must be `const`&hyphen;qualified&period; The behavior is undefined unless all of these six overloads are defined&period; Note that overloads that are not applicable in a given application need not do anything other than return&period; Also note that if `visitor` is `const` qualified then each of its `operator()` overloads must also be `const` qualified&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class RETURN&lowbar;TYPE,
    class VISITOR&gt;
RETURN&lowbar;TYPE
visit(VISITOR&& visitor) const;
----


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