public static function smartUnserialize($str, $assoc = true)
    {
        if ($str[0] === '{' || $str[0] === '[') {
            return Json::parse($str, $assoc);
        }

        return Serialization::parse($str);
    }