Req #18023 [Opn]: Output of assoc array instead of stdClass for JSON

From: Date: Mon, 01 Nov 2010 23:07:12 +0000
Subject: Req #18023 [Opn]: Output of assoc array instead of stdClass for JSON
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-5014@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=18023&edit=1 ID: 18023 Updated by: mass@jeremiahlee.com Reported By: mass at jeremiahlee dot com -Summary: Output is stdClass instead of JSON +Summary: Output of assoc array instead of stdClass for JSON Status: Open Type: Feature/Change Request Package: Services_Twitter Operating System: Not Relevant Package Version: 0.6.3 PHP Version: 5.2.10 Roadmap Versions: New Comment: -Summary: Output is stdClass instead of JSON +Summary: Output of assoc array instead of stdClass for JSON Previous Comments: ------------------------------------------------------------------------ [2010-11-01 23:06:39] jeremiahlee Description: ------------ $twitter->statuses->update() is returning a stdClass instead of an associative array when set to OUTPUT_JSON, so responses cannot be converted to strings for logging or database storage. To fix: json_decode($body, TRUE) will provide an associative array. I understand that I can get the raw response and do this manually. It would be preferable to have an associative array of the JSON as a configurable option. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=18023&edit=1

« previous php.pear.bugs (#5014) next »