Exemple #1
0
        private bool MatchArray(WSJArray jUserData, string _key = null)
        {
            bool _match = true;//insure that the empty array gives true

            try
            {
                foreach (WSJson jItem in (jUserData).Value)
                {
                    _match = false;//insure that the NOT empty array gives false on failure
                    if (jItem is WSJValue && !string.IsNullOrEmpty(_key))
                    {
                        _match = MatchValue(_key, (WSJValue)jItem, WSFieldFilter.GLOBAL_OPERATIONS.Equal.NAME);
                    }
                    else if (jItem is WSJObject)
                    {
                        _match = MatchObject((WSJObject)jItem, _key);
                    }
                    else if (jItem is WSJArray)
                    {
                        _match = MatchArray((WSJArray)jItem, _key);
                    }
                    if (_match)
                    {
                        break;
                    }
                }
            }
            catch (Exception) { }
            return(_match);
        }
Exemple #2
0
 public WSOptionSchema(WSJArray _json)
 {
     option = _json;
 }