#include "openjson.h" #include #include int main() { std::string buff1; OpenJson json; auto& nodeRoot = json["users"]; size_t i = 0; // ±éÀú½á¹û¼¯ while (i < 3) { auto& node = nodeRoot[i]; node["id"] = "userid"; node["user"] = "user"; node["passwd"] = "passwordpassword"; node["salt"] = "saltsaltsalt"; i++; } buff1 = json.encode(); return 0; }