> This page is for version 5.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 5.0 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-0-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.6: https://docs.nvidia.com/holoscan/sdk-user-guide/4-6/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::config::Path

> Own an RFC 6901 JSON Pointer path.

Own an RFC 6901 JSON Pointer path.

Paths copy and validate every token. They are independent of the source text and safe for concurrent reads after construction.

```cpp showLineNumbers={false}
#include <holoscan/config/document.hpp>
```

---

## Methods

### token_count \[#tokencount]

```cpp showLineNumbers={false}
std::size_t holoscan::config::Path::token_count() const noexcept
```

Return the number of decoded tokens.

### token \[#token]

```cpp showLineNumbers={false}
std::string_view holoscan::config::Path::token(
    std::size_t index
) const noexcept
```

Borrow one decoded token.

**Returns:** The token, or an empty view when `index` is out of range.

**Parameters**

**`index`** `std::size_t`

Zero-based token index.

---

### to_string \[#tostring]

```cpp showLineNumbers={false}
std::string holoscan::config::Path::to_string() const
```

Render the path with RFC 6901 escaping.

**Returns:** Newly allocated pointer text; the root renders as an empty string.

### is_root \[#isroot]

```cpp showLineNumbers={false}
bool holoscan::config::Path::is_root() const noexcept
```

Return whether this path addresses the document root.

---

## Static methods

### parse \[#parse]

```cpp showLineNumbers={false}
static Path holoscan::config::Path::parse(
    std::string_view text
)
```

Parse and own an RFC 6901 JSON Pointer.

**Returns:** The owned path.

**Throws:** `ConfigException` with `CONFIG_PATH_SYNTAX`, `CONFIG_INVALID_UTF8`, or `CONFIG_LIMIT_EXCEEDED` on failure.

**Parameters**

**`text`** `std::string_view`

Empty root text or slash-prefixed UTF-8 pointer text.

---

**See also:**
[try_parse](#tryparse)

### try_parse \[#tryparse]

```cpp showLineNumbers={false}
static ConfigResult<Path> holoscan::config::Path::try_parse(
    std::string_view text
)
```

Try to parse and own an RFC 6901 JSON Pointer.

**Returns:** The owned path or `CONFIG_PATH_SYNTAX`/`CONFIG_INVALID_UTF8`/ `CONFIG_LIMIT_EXCEEDED`.

**Parameters**

**`text`** `std::string_view`

Empty root text or slash-prefixed UTF-8 pointer text.

---

**See also:**
[parse](#parse)

### root \[#root]

```cpp showLineNumbers={false}
static Path holoscan::config::Path::root() noexcept
```

Create the empty root path without allocating.

---

## Member variables

| Name      | Type                         | Description |
| --------- | ---------------------------- | ----------- |
| `tokens_` | `std::vector< std::string >` |             |