[wp-trac] [WordPress Trac] #28786: wp_send_json silently fails on non UTF-8 strings

WordPress Trac noreply at wordpress.org
Tue Jul 15 05:41:15 UTC 2014


#28786: wp_send_json silently fails on non UTF-8 strings
------------------------------+------------------
 Reporter:  pento             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.0
Component:  General           |     Version:  3.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+------------------

Comment (by pento):

 attachment:json_test.php does some performance testing. Results show that,
 for data that works fine with `json_encode()`, the overhead of
 `wp_json_encode()` is minimal. For extremely large data sets that need to
 be converted, performance can be pretty bad, but I don't think we're going
 to encounter much in the way of 6D arrays with 1,000,000 items in them.
 :-)


 {{{
 $ php json_test.php
 json_encode: 0.051064968109131
 wp_json_encode overhead: 0.052061080932617
 Best case wp_json_encode: 2.9125101566315
 Worst case wp_json_encode: 15.276411056519
 }}}

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


More information about the wp-trac mailing list