[#nlohmann-basic_json-05-value-03]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-05.adoc[basic&lowbar;json&lt;&gt;]::value
:relfileprefix: ../../
:mrdocs:

== Synopsis

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class ValueType,
    class BasicJsonType,
    class ReturnType = value&lowbar;return&lowbar;type&lt;ValueType&gt;::type&gt;
requires detail&colon;&colon;is&lowbar;basic&lowbar;json&lt;BasicJsonType&gt;&colon;&colon;value
                   &amp;&amp; detail&colon;&colon;is&lowbar;getable&lt;basic&lowbar;json&lowbar;t, ReturnType&gt;&colon;&colon;value
                   &amp;&amp; !std&colon;&colon;is&lowbar;same&lt;value&lowbar;t, detail&colon;&colon;uncvref&lowbar;t&lt;ValueType&gt;&gt;&colon;&colon;value
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
ReturnType
value(
    xref:nlohmann/json_pointer-0a.adoc[nlohmann::json&lowbar;pointer&lt;BasicJsonType&gt;] const& ptr,
    ValueType&& default&lowbar;value) const;
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]: Since 3&period;11&period;0&semi; use basic&lowbar;json&colon;&colon;json&lowbar;pointer or nlohmann&colon;&colon;json&lowbar;pointer&lt;basic&lowbar;json&colon;&colon;string&lowbar;t&gt;. Use of this entity is allowed but discouraged.
====

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