Hi ,
Some advice needed .
I have Zend_Rest_Client_Result http://pastie.org/1255687 as shown in pastie
.
Iterated through the object as below and created json .
Is this the way or whether we have any better approach ?
$jsonString = '[';
foreach( $responses->status as $response ) {
$status = array(
'created_at' => $response->created_at,
'id' => $response->id,
'text' => $response->text,
'source' => $response->source,
'favourited' => $response->favourited,
'user_name' => $response->user->name,
'user_screen_name' => $response->user->screen_name
);
$jsonString .= json_encode( $status ) . ', ';
}
echo $jsonString . ']';
//echo Zend_Json::fromXml($responses); // Will not work .
Thanks
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Created-json-with-Zend-Service-Twitter-and-Zend-Rest-Client-Result-tp3017681p3017681.html
Sent from the Zend Framework mailing list archive at Nabble.com.