mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +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::is_structured
|
||||
# <small>nlohmann::basic_json::</small>is_structured
|
||||
|
||||
```cpp
|
||||
constexpr bool is_structured() const noexcept;
|
||||
@ -18,6 +18,15 @@ No-throw guarantee: this member function never throws exceptions.
|
||||
|
||||
Constant.
|
||||
|
||||
## Possible implementation
|
||||
|
||||
```cpp
|
||||
constexpr bool is_primitive() const noexcept
|
||||
{
|
||||
return is_array() || is_object();
|
||||
}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
The term *structured* stems from [RFC 8259](https://tools.ietf.org/html/rfc8259):
|
||||
@ -27,7 +36,7 @@ The term *structured* stems from [RFC 8259](https://tools.ietf.org/html/rfc8259)
|
||||
|
||||
Note that though strings are containers in C++, they are treated as primitive values in JSON.
|
||||
|
||||
## Example
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
@ -43,6 +52,12 @@ Note that though strings are containers in C++, they are treated as primitive va
|
||||
--8<-- "examples/is_structured.output"
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [is_primitive()](is_primitive.md) returns whether JSON value is primitive
|
||||
- [is_array()](is_array.md) returns whether value is an array
|
||||
- [is_object()](is_object.md) returns whether value is an object
|
||||
|
||||
## Version history
|
||||
|
||||
- Added in version 1.0.0.
|
||||
|
Reference in New Issue
Block a user