mirror of
https://github.com/nlohmann/json.git
synced 2026-10-15 02:37:13 +00:00
deploy: 40a62947d3
This commit is contained in:
1 parent
79119509a9
commit
22fba27145
555 files changed
+17342
-1394
No files matched your search
@@ -58,13 +58,24 @@ Arrays are stored as pointers in a `basic_json` type. That is, for any access to
|
||||
The following code shows that `array_t` is by default, a typedef to `#!cpp std::vector<nlohmann::json>`.
|
||||
|
||||
```cpp
|
||||
--8<-- "examples/array_t.cpp"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << std::boolalpha << std::is_same<std::vector<json>, json::array_t>::value << std::endl;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
--8<-- "examples/array_t.output"
|
||||
true
|
||||
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
Reference in new issue
Block a user