mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Consolidate documentation (#3071)
* 🔥 consolidate documentation * ♻️ overwork std specializations * 🚚 move images files to mkdocs * ♻️ fix URLs * 🔧 tweak MkDocs configuration * 🔧 add namespaces * 📝 document deprecations * 📝 document documentation generation * 🚸 improve search * 🚸 add examples * 🚧 start adding documentation for macros * 📝 add note for https://github.com/nlohmann/json/issues/874#issuecomment-1001699139 * 📝 overwork example handling * 📝 fix Markdown tables
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# basic_json::empty
|
||||
# <small>nlohmann::basic_json::</small>empty
|
||||
|
||||
```cpp
|
||||
bool empty() const noexcept;
|
||||
@ -10,15 +10,15 @@ Checks if a JSON value has no elements (i.e. whether its [`size()`](size.md) is
|
||||
|
||||
The return value depends on the different types and is defined as follows:
|
||||
|
||||
Value type | return value
|
||||
----------- | -------------
|
||||
null | `#!cpp true`
|
||||
boolean | `#!cpp false`
|
||||
string | `#!cpp false`
|
||||
number | `#!cpp false`
|
||||
binary | `#!cpp false`
|
||||
object | result of function `object_t::empty()`
|
||||
array | result of function `array_t::empty()`
|
||||
| Value type | return value |
|
||||
|------------|----------------------------------------|
|
||||
| null | `#!cpp true` |
|
||||
| boolean | `#!cpp false` |
|
||||
| string | `#!cpp false` |
|
||||
| number | `#!cpp false` |
|
||||
| binary | `#!cpp false` |
|
||||
| object | result of function `object_t::empty()` |
|
||||
| array | result of function `array_t::empty()` |
|
||||
|
||||
## Exception safety
|
||||
|
||||
@ -44,7 +44,7 @@ bool empty() const noexcept
|
||||
This function does not return whether a string stored as JSON value is empty -- it returns whether the JSON container
|
||||
itself is empty which is `#!cpp false` in the case of a string.
|
||||
|
||||
## Example
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
|
Reference in New Issue
Block a user