Esempio n. 1
0
        public static double?GetAvg(string jsonData, string expression)
        {
            JSONQuerySelector json = new JSONQuerySelector();
            var results            = json.SearchValue(jsonData, expression);

            Calculator calculator = new Calculator();

            return(calculator.GetAverage(results));
        }
Esempio n. 2
0
        public static int GetCount(string jsonData, string expression)
        {
            JSONQuerySelector json = new JSONQuerySelector();
            var results            = json.SearchValue(jsonData, expression);

            Calculator calculator = new Calculator();

            return(calculator.GetCount(results));
        }
Esempio n. 3
0
        public static Nullable <T> GetMax <T>(string jsonData, string expression)
            where T : struct
        {
            JSONQuerySelector json = new JSONQuerySelector();
            var results            = json.SearchValue(jsonData, expression);

            Calculator calculator = new Calculator();
            var        max        = calculator.GetMax(results);

            return(max.SafeCast <T>());
        }
Esempio n. 4
0
        public static object GetValue(string jsonData, string expression)
        {
            JSONQuerySelector json = new JSONQuerySelector();

            return(json.SearchValue(jsonData, expression));
        }