[wp-trac] [WordPress Trac] #25311: Replace PHP-serialized data with JSON in api.wordpress.org

WordPress Trac noreply at wordpress.org
Fri Sep 13 17:43:05 UTC 2013


#25311: Replace PHP-serialized data with JSON in api.wordpress.org
--------------------------------+------------------------------
 Reporter:  scribu              |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  WordPress.org site  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:                      |
--------------------------------+------------------------------

Comment (by nacin):

 [attachment:25311.diff] receives JSON-encoded data from 1.1 endpoints for
 core/browse-happy, importers, and credits. It's the same data structures
 as the serialized data, which means associative arrays become objects.
 Here, I've chosen to manually convert them back to arrays for storage and
 reference.

 Two of them (browse-happy, importers) are simple, and also correspond to
 the array-based return of public functions. Credits is a bit more
 complicated of a data structure; and we could very likely get away with
 changing the return value of wp_credits() (and also the data type of the
 transient) and then change all of the references from arrays to objects.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25311#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list