Return the result (having RETURN_TYPE) of invoking the specified visitor (callable) object on this Json object. visitor must be callable as if it provides the following overloads of operator(): ` RETURN_TYPE operator()(const JsonObject& object ); RETURN_TYPE operator()(const JsonArray& array ); RETURN_TYPE operator()(const bsl::string& string ); RETURN_TYPE operator()(const JsonNumber& number ); RETURN_TYPE operator()(const bool& boolean); RETURN_TYPE operator()(const JsonNull& null ); ` The overload corresponding to the current type() of this Json object is invoked. For C++03 visitor must be const-qualified. The behavior is undefined unless all of these six overloads are defined. Note that overloads that are not applicable in a given application need not do anything other than return. Also note that if visitor is const qualified then each of its operator() overloads must also be const qualified.
Declared in <bdljsn_json.h>
template<
class RETURN_TYPE,
class VISITOR>
RETURN_TYPE
visit(VISITOR&& visitor) const;