_json_decode_object_helper

The WordPress Core json decode object helper function.

Description

(array) _json_decode_object_helper( (object) $data ); 

Returns (array)

Parameters (1)

0. $data (object)
The data.

Usage

  1. if ( !function_exists( '_json_decode_object_helper' ) ) { 
  2. require_once ABSPATH . WPINC . '/compat.php'; 
  3.  
  4. // The data. 
  5. $data = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _json_decode_object_helper($data); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/compat.php  
  1. function _json_decode_object_helper($data) { 
  2. if ( is_object($data) ) 
  3. $data = get_object_vars($data); 
  4. return is_array($data) ? array_map(__FUNCTION__, $data) : $data;