GuzzleHttpjson_decode

Wrapper for json_decode that throws when an error occurs.

Description

GuzzleHttp\json_decode( (string) $json, (constant) $assoc = false, (int) $depth = 512, (int) $options = 0 ); 

Parameters (4)

0. $json (string)
JSON data to parse
1. $assoc — Optional. (constant) => false
When true, returned objects will be converted into associative arrays.
2. $depth — Optional. (int) => 512
User specified recursion depth.
3. $options — Optional. (int)
Bitmask of JSON decode options.

Usage

  1. if ( !function_exists( 'GuzzleHttp\json_decode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/functions.php'; 
  3.  
  4. // JSON data to parse 
  5. $json = ''; 
  6.  
  7. // When true, returned objects will be converted 
  8. // into associative arrays. 
  9. $assoc = false; 
  10.  
  11. // User specified recursion depth. 
  12. $depth = 512; 
  13.  
  14. // Bitmask of JSON decode options. 
  15. $options = -1; 
  16.  
  17. // NOTICE! Understand what this does before running. 
  18. $result = GuzzleHttp\json_decode($json, $assoc, $depth, $options); 
  19.  

Defined (1)

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

/lib/Azure/GuzzleHttp/functions.php