Пример #1
0
    public static string[] SplitArray(JSONNode jsonData)
    {
        string str = jsonData == null || !jsonData.Exists() ? null : jsonData.AsDecodedURL();

        if (string.IsNullOrEmpty(str))
        {
            return(null);
        }

        Regex badChars = new Regex(@"[^\w_\-,]*", RegexOptions.IgnoreCase);

        str = badChars.Replace(str, "");

        string[] strSplit = str.Split(",");

        return(strSplit);
    }
Пример #2
0
    public static Dictionary <string, string> SplitKVStrings(JSONNode jsonData, string delimLines = "\n", string delimKV = "=", bool trimBadChars = true)
    {
        string str = jsonData.AsDecodedURL();

        return(SplitKVStrings(str, delimLines, delimKV, trimBadChars));
    }