json_encode
The WordPress Core json encode function.
Description
json_encode();
Usage
if ( !function_exists( 'json_encode' ) ) { require_once ABSPATH . '/wp-admin/includes/noop.php'; } // NOTICE! Understand what this does before running. $result = json_encode();
Defined (2)
The function is defined in the following location(s).
- /wp-admin/includes/noop.php
- function json_encode() {}
- /wp-includes/compat.php
- function json_encode( $string ) {
- global $wp_json;
- if ( ! ( $wp_json instanceof Services_JSON ) ) {
- $wp_json = new Services_JSON();
- }
- return $wp_json->encodeUnsafe( $string );
- }