#include "rapidjson/document.h" rapidjson::Document doc; doc.Parse("{\"key\": \"value\"}"); auto obj = doc.GetObject();
#include "rapidjson/document.h" rapidjson::Document doc; doc.Parse("[1, 2, 3]"); auto arr = doc.GetArray(); std::vectorIn this example, we first create a JSON document by parsing a string representation of the JSON array. Then, we use the `GetArray` method to obtain a `rapidjson::Value` representing the array. Finally, we loop through each element in the array and convert it to an `int` before adding it to a C++ vector. Package Library: RapidJSONvec; for (auto& v : arr) { vec.push_back(v.GetInt()); }