[wp-trac] [WordPress Trac] #29435: wp_send_json() & co. should support json_encode()'s optional arguments

WordPress Trac noreply at wordpress.org
Sun Oct 26 00:46:02 UTC 2014


#29435: wp_send_json() & co. should support json_encode()'s optional arguments
-----------------------------+------------------------------
 Reporter:  Viper007Bond     |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Gallery          |     Version:  3.9.2
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:
-----------------------------+------------------------------
Changes (by nacin):

 * keywords:  has-patch dev-feedback => has-patch close


Comment:

 To be honest, this doesn't seem like something I find particularly
 necessary. It adds unnecessary complexity to a dead-simple utility
 function.

 At most, we could pass JSON_PRETTY_PRINT when WP_DEBUG. But I'd be more
 inclined to just suggest a change in your debugging in such a way that
 your browser handles this for you — and better than just whitespace. In
 Chrome, there's a popular extension for turning JSON into a collapsable
 tree. Viewing an XHR request in the inspector also gives you a full
 preview that is, again, an expandable tree.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29435#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list