Esempio n. 1
0
        private void validateInt(ValidationState state, IJson instance, long min, long max)
        {
            if (!instance.IsNumber())
            {
                state.PushError();
                return;
            }

            double val = instance.AsNumber();

            if (val < min || val > max || val != Math.Round(val))
            {
                state.PushError();
            }
        }