Ip\Internal\Plugins\Helper::jsonCleanDecode PHP Метод

jsonCleanDecode() публичный статический Метод

Work like the original php json_decode() function with the same params
public static jsonCleanDecode ( string $json, boolean $assoc = false, integer $depth = 512, integer $options ) : string
$json string The json string being decoded
$assoc boolean When TRUE, returned objects will be converted into associative arrays.
$depth integer User specified recursion depth. (>=5.3)
$options integer Bitmask of JSON decode options. (>=5.4)
Результат string
    public static function jsonCleanDecode($json, $assoc = false, $depth = 512, $options = 0)
    {
        // search and remove comments like /* */ and //
        $json = preg_replace("#(/\\*([^*]|[\r\n]|(\\*+([^*/]|[\r\n])))*\\*+/)|([\\s\t](//).*)#", '', $json);
        $json = json_decode($json, $assoc, $depth, $options);
        return $json;
    }