I found the same issue when I first started with Phirehose. The suggestion to go through a validator is an excellent one -- I use
pro.jsonlint.com to debug the JSON stuff.
We break our tweets into an array before we start our analysis, so my solution was more like this:
$rawData = file_get_contents ( $sourceFile ); // Source file is the ghetto-queue generated file.
if(strpos($rawData, "}{")) { // Multiple nodules in a single file - JSON not formatted correctly, fix.
$tmpNodules = explode("}-{",str_replace("}{", "}}-{{", $rawData)); // Pull 'em apart, then re-merge them.
$serviceNodules = array_merge($serviceNodules, $tmpNodules);
}
The second line above is looking for that same issue. $serviceNodules is the array that holds all the tweets.
I realize this may be out of date but it had us stuck for awhile.
Scott.