[#nlohmann-basic_json-00-value-07]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-00.adoc[basic&lowbar;json]::value
:relfileprefix: ../../
:mrdocs:

access specified object element via JSON Pointer with default value

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ValueType&gt;
requires detail&colon;&colon;is&lowbar;getable&lt;basic&lowbar;json&lowbar;t, ValueType&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
ValueType
value(
    xref:nlohmann/basic_json-00/json_pointer.adoc[json&lowbar;pointer] const& ptr,
    ValueType const& default&lowbar;value) const;
----

== Parameters

[cols="1,4"]
|===
|Name|Description

| *ptr*
| JSON Pointer, see xref:nlohmann/json_pointer-0b.adoc[`nlohmann&colon;&colon;json&lowbar;pointer`]
|===


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