Looking at the code you posted it looks like you are trying to create a json array of json objects. You can create a json array with our library by using one of the factory function overloads json::value::array(…). In particular there is one that takes a std::vector<json::value>.
Another option is to let our library directly handle the storage for the json array elements in our object model. This could be done with something like the following: