Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.7.0

Request #18023 Output of assoc array instead of stdClass for JSON
Submitted: 2010-11-02 03:06 UTC
From: jeremiahlee Assigned:
Status: Open Package: Services_Twitter (version 0.6.3)
PHP Version: 5.2.10 OS: Not Relevant
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 + 27 = ?

 
 [2010-11-02 03:06 UTC] jeremiahlee (Jeremiah Cohick)
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.

Comments

 [2010-11-02 03:07 UTC] jeremiahlee (Jeremiah Cohick)
-Summary: Output is stdClass instead of JSON +Summary: Output of assoc array instead of stdClass for JSON