I am storing my data from external file to mongodb in localhost. it's quite huge dataset of volume 1.70GB with ~10 million tweets. While importing from file to mongodb it shows me the error "JSON reader was expecting a name but found ':'" I dint have any error on previous files. But this I cant figure it out. The data is just a real time collection of tweets from streaming API in a json format.
BufferedReader br = new BufferedReader(new FileReader(file));
int counter = 0;
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
Document old_status = Document.parse(line);
// If it is a deleted tweet, then continue
if (old_status.containsKey("delete")) {
continue;
}
//populate original tweets
Document original_status = new Document();
if(line.contains("retweeted_status")){
Document retweets = (Document)old_status.get("retweeted_status");
original_status.append("status",retweets.get("text"));
original_status.append("Likes",retweets.getInteger("favorite_count"));}}
its a sample code for importing data from file to mongo collection. Help me to solve this. I really stuck in this place and it takes my time. Thanks in advance.