예제 #1
0
 public bool TryEvaluateSelector(ISelectorInfo selectorInfo)
 {
     // Note: Operators are processed by ListFormatter
     return(selectorInfo.CurrentValue switch
     {
         JObject _ => NewtonSoftJson.TryEvaluateSelector(selectorInfo),
         JsonElement _ => SystemTextJson.TryEvaluateSelector(selectorInfo),
         _ => false
     });
예제 #2
0
        public bool TryEvaluateSelector(ISelectorInfo selectorInfo)
        {
            // Note: Operators are processed by ListFormatter
            switch (selectorInfo.CurrentValue)
            {
            case JObject _:
                return(NewtonSoftJson.TryEvaluateSelector(selectorInfo));

            case JsonElement _:
                return(SystemTextJson.TryEvaluateSelector(selectorInfo));

            default:
                return(false);
            }
        }