Files
json/api/json_pointer/string_t.md
T
2026-10-12 07:35:31 +00:00

49 lines
1.0 KiB
Markdown

# <small>nlohmann::json_pointer::</small>string_t
```cpp
using string_t = RefStringType;
```
The string type used for the reference tokens making up the JSON pointer.
See [`basic_json::string_t`](../basic_json/string_t.md) for more information.
## Examples
??? example
The example shows the type `string_t` and its relation to `basic_json::string_t`.
```cpp
#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
int main()
{
json::json_pointer::string_t s = "This is a string.";
std::cout << s << std::endl;
std::cout << std::boolalpha << std::is_same<json::json_pointer::string_t, json::string_t>::value << std::endl;
}
```
Output:
```json
This is a string.
true
```
## See also
- [basic_json::string_t](../basic_json/string_t.md) type used to store JSON strings
- [to_string](to_string.md) return a string representation of the JSON pointer
## Version history
- Added in version 3.11.0.