src/MVQN/Common/Patterns.php
public static function isJSON(string &$value = null, bool $mutate = true): bool
    {
        $result = preg_match(self::PATTERN_JSON, $value) == true;

        $json = null;

        if($result)
        {
            $json = json_decode($value, true);

            if($mutate && $json !== null)
                $value = $json;
        }

        return $json !== null && $result;
    }
public static function isJSON(string &$value = null, bool $mutate = true): bool
    {
        $result = preg_match(self::PATTERN_JSON, $value) == true;

        $json = null;

        if($result)
        {
            $json = json_decode($value, true);

            if($mutate && $json !== null)
                $value = $json;
        }

        return $json !== null && $result;
    }
private const PATTERN_EVAL    = "/(\`.*\`)/";