Function smf_json_decode
Wrapper function for json_decode() with error handling.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
string |
$json |
The string to decode. |
boolean |
$returnAsArray = false |
To return the decoded string as an array or an object, SMF only uses Arrays but to keep on compatibility with json_decode its set to false as default. |
boolean |
$logIt = true |
To specify if the error will be logged if theres any. |
array
|
Either an empty array or the decoded data as an array. |