mirror of
https://github.com/nlohmann/json.git
synced 2026-07-09 20:15:12 +00:00
deploy: 7c9208bfb3
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# <small>nlohmann::json_pointer::</small>empty
|
||||
|
||||
```cpp
|
||||
bool empty() const noexcept;
|
||||
```
|
||||
|
||||
Return whether the pointer points to the root document.
|
||||
|
||||
## Return value
|
||||
|
||||
`#!cpp true` iff the JSON pointer points to the root document.
|
||||
|
||||
## Exception safety
|
||||
|
||||
No-throw guarantee: this function never throws exceptions.
|
||||
|
||||
## Complexity
|
||||
|
||||
Constant.
|
||||
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
The example shows the result of `empty` for different JSON Pointers.
|
||||
|
||||
```cpp
|
||||
--8<-- "examples/json_pointer__empty.cpp"
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
--8<-- "examples/json_pointer__empty.output"
|
||||
```
|
||||
|
||||
## Version history
|
||||
|
||||
Added in version 3.6.0.
|
||||
Reference in New Issue
Block a user