-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7248a50
commit b1dd98c
Showing
1 changed file
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |