Fix up Twitter JSON formatting to be consistent between the polling and streaming API interfaces; basic stream tester can now import your notices (ooooh)

This commit is contained in:
Brion Vibber
2010-10-05 14:26:11 -07:00
parent 0eaa26476c
commit 408483f771
3 changed files with 78 additions and 55 deletions

View File

@@ -253,7 +253,7 @@ abstract class JsonStreamReader
// Server sends empty lines as keepalive.
return;
}
$data = json_decode($line, true);
$data = json_decode($line);
if ($data) {
$this->handleJson($data);
} else {
@@ -261,5 +261,5 @@ abstract class JsonStreamReader
}
}
abstract protected function handleJson(array $data);
abstract protected function handleJson(stdClass $data);
}