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::size
|
||||
# <small>nlohmann::basic_json::</small>size
|
||||
|
||||
```cpp
|
||||
size_type size() const noexcept;
|
||||
@ -10,15 +10,15 @@ Returns the number of elements in a JSON value.
|
||||
|
||||
The return value depends on the different types and is defined as follows:
|
||||
|
||||
Value type | return value
|
||||
----------- | -------------
|
||||
null | `0`
|
||||
boolean | `1`
|
||||
string | `1`
|
||||
number | `1`
|
||||
binary | `1`
|
||||
object | result of function object_t::size()
|
||||
array | result of function array_t::size()
|
||||
| Value type | return value |
|
||||
|------------|-------------------------------------|
|
||||
| null | `0` |
|
||||
| boolean | `1` |
|
||||
| string | `1` |
|
||||
| number | `1` |
|
||||
| binary | `1` |
|
||||
| object | result of function object_t::size() |
|
||||
| array | result of function array_t::size() |
|
||||
|
||||
## Exception safety
|
||||
|
||||
@ -35,7 +35,7 @@ constant complexity.
|
||||
This function does not return the length of a string stored as JSON value -- it returns the number of elements in the
|
||||
JSON value which is `1` in the case of a string.
|
||||
|
||||
## Example
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
|
Reference in New Issue
Block a user