[#nlohmann-basic_json-0e-get-0e] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/basic_json-0e.adoc[basic_json<>]::get :relfileprefix: ../../ :mrdocs: get a pointer value (explicit) == Synopsis Declared in `<nlohmann/json.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename PointerType> requires std::is_pointer<PointerType>::value decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>()) get() noexcept; ---- == Description Explicit pointer access to the internally stored JSON value. No copies are made. [WARNING] The pointer becomes invalid if the underlying JSON object changes. Constant. {The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a `nullptr` is returned if the value and the requested pointer type does not match.,get_PointerType} == Return Value pointer to the internally stored JSON value if the requested pointer type _PointerType_ fits to the JSON value; `nullptr` otherwise == Template Parameters [cols=2] |=== | Name | Description | *PointerType* | pointer type; must be a pointer to xref:nlohmann/basic_json-0e/array_t.adoc[`array_t`], xref:nlohmann/basic_json-0e/object_t.adoc[`object_t`], xref:nlohmann/basic_json-0e/string_t.adoc[`string_t`], xref:nlohmann/basic_json-0e/boolean_t.adoc[`boolean_t`], xref:nlohmann/basic_json-0e/number_integer_t.adoc[`number_integer_t`], xref:nlohmann/basic_json-0e/number_unsigned_t.adoc[`number_unsigned_t`], or xref:nlohmann/basic_json-0e/number_float_t.adoc[`number_float_t`]. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#