Closed
Description
Are there any hard limits in JSONCPP with respect to object size (other than memory available on the heap)?
I wrote a really simple program to experiment with large objects in JSONCPP (see code below). I hit a limit WRT objects at ~400MB.
include
include <json/json.h>
include
include
int main(int argc, char** argv) {
int count = std::atoi(argv[1]);
int messages = 100000000;
for (int i=0; i<count; ++i) {
Json::Value root(Json::arrayValue);
for (int j=0; j<messages; ++j) {
Json::Value& security = root.append(Json::Value(Json::objectValue));
security["symbol"] = "msft.o";
security["price"] = 27.0;
security["fair"] = 27.0;
}
Json::FastWriter writer;
std::cout << writer.write(root);
}
}