Skip to content

Commit

Permalink
rapidJSON???
Browse files Browse the repository at this point in the history
  • Loading branch information
karinashin committed Apr 10, 2022
1 parent 7248a50 commit b1dd98c
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
#include <iostream>
#include <string>
#include <fstream>
#include "include/rapidjson/document.h"

using namespace std;
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
rapidjson::Document doc;
ifstream stream;
stream.open("blogs_0000001.json");
if (!stream.is_open())
cout << "Not open" << endl;
//
// string wholeFile;
// string temp;
// while (getline(stream, temp))//not reading anything
// {
// cout << temp << endl;
// wholeFile += temp;
// }
// stream.close();
//
// doc.Parse(wholeFile.c_str());
// if (doc.IsObject()) cout << "ITS AN OBJECT" << endl;
//
// string notArr = doc["root"]["entities"]["persons"][0]["name"].GetString();
// cout << "notArr: " << notArr << endl;
//
// doc["root"]["entities"]["persons"].IsObject();
// doc["root"]["entities"]["persons"].IsArray();
// for (auto& v : doc["root"]["entities"]["persons"].GetArray())
// cout << "Value: " << v.GetString() << endl;
}

0 comments on commit b1dd98c

Please sign in to comment.