Why does node.js always report errors when parsing json after reading files?

  node.js, question

Txt

{“title”:”Hello”,”content”:”nihao”,”id”:1439883748614}
{“title”:”Hello”,”content”:”nihao”,”id”:1439883789405}
{“title”:”Hello”,”content”:”nihao”,”id”:1439883893949}
{“title”:”Hello”,”content”:”nihao”,”id”:1439883895058}
{“title”:”Hello”,”content”:”nihao”,”id”:1439883896144}

Js code:

var fs=require('fs');
 fs.readFile('./data/data.txt','utf-8',function(err,data){
 if(err){
 console.log("error");
 }else{
 var array=data.split('\n');
 for (var i = 0;   i < array.length;  I plus)
 var str=array[i];
 console.log(str);
 var b=JSON.parse(str);
 bracket
 bracket
 });

Clearly it is standard json, why do you always report mistakes? Error:

SyntaxError: Unexpected end of input

at Object.parse (native)
 at C:\Users\***\Documents\GitHub\Eyas\control\handle.js:44:19
 at fs.js:334:14
 at FSReqWrap.oncomplete (fs.js:95:15)

I answered myself: I found the reason. When writing the file, I finally generated an empty line, which made me dizzy. . . .