1# basic_json::is_structured
2
3```cpp
4constexpr bool is_structured() const noexcept;
5```
6
7This function returns `#!cpp true` if and only if the JSON type is structured (array or object).
8
9## Return value
10
11`#!cpp true` if type is structured (array or object), `#!cpp false` otherwise.
12
13## Exception safety
14
15No-throw guarantee: this member function never throws exceptions.
16
17## Complexity
18
19Constant.
20
21## Notes
22
23The term *structured* stems from [RFC 8259](https://tools.ietf.org/html/rfc8259):
24
25> JSON can represent four primitive types (strings, numbers, booleans, and null) and two structured types (objects and
26> arrays).
27
28Note that though strings are containers in C++, they are treated as primitive values in JSON.
29
30## Example
31
32??? example
33
34    The following code exemplifies `is_structured()` for all JSON types.
35
36    ```cpp
37    --8<-- "examples/is_structured.cpp"
38    ```
39
40    Output:
41
42    ```json
43    --8<-- "examples/is_structured.output"
44    ```
45
46## Version history
47
48- Added in version 1.0.0.
49