get_ptr overloads

Synopses

Declared in <folly/json/dynamic.h>

Nullable access to a sub‐field or index by key.

dynamic const*
get_ptr(StringPiece key) const &;

Nullable access to a sub‐field or index by key.

Nullable access to a sub‐field or index by key.

dynamic*
get_ptr(StringPiece key) && = delete;

Nullable access.

dynamic const*
get_ptr(json_pointer const& ptr) const &;

Nullable JSON pointer access.

dynamic*
get_ptr(json_pointer const& ptr) &;

Nullable JSON pointer access.

dynamic const*
get_ptr(json_pointer const& ptr) const && = delete;

Nullable JSON pointer access.

dynamic*
get_ptr(json_pointer const& ptr) && = delete;

Access a sub‐field or index by key, returning nullptr if absent.

template<typename K>
dynamic const*
get_ptr(K&& key) const &;

Nullable access to a sub‐field or index by key.

template<typename K>
dynamic*
get_ptr(K&& key) &;

Nullable access to a sub‐field or index by key.

template<typename K>
dynamic*
get_ptr(K&& key) && = delete;

Return Value

  • A pointer to the element, or nullptr if absent.

  • A pointer to the located element, or nullptr if absent. methodset Element access

  • A pointer to the located element, or nullptr if absent.

Parameters

Name

Description

key

The index or field name to access.

ptr

The JSON pointer locating the element.

Created with MrDocs