wp_json_file_decode
wp_json_file_decode ( $filename, $options = array() )
Parameters:- (string) filename Path to the JSON file.
- (array) options { Optional. Options to be used with `json_decode()`. @type bool $associative Optional. When `true`, JSON objects will be returned as associative arrays. When `false`, JSON objects will be returned as objects. Default false. }
Returns:- (mixed) Returns the value encoded in JSON in appropriate PHP type. `null` is returned if the file is not found, or its content can't be decoded.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Reads and decodes a JSON file.