Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #28786, comment 39


Ignore:
Timestamp:
11/02/2014 05:56:30 PM (12 years ago)
Author:
azaozz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28786, comment 39

    initial v1  
    44Right, also a "proper" JSON encoded value is `'false'`, `'0'`, `'""'`, etc. On the JS side JSON.parse() and jQuery.parseJSON() throw errors on empty string, int, etc.
    55
    6 We should also handle the `false` returned from `wp_json_encode()` in `wp_send_json_success()` and `wp_send_json_error()`.
     6We should probably handle the `false` returned from `wp_json_encode()` in `wp_send_json_success()` and `wp_send_json_error()`.