예제 #1
0
        public bool?ValueAsNullableBoolean(string key)
        {
            JsonBoolean boolVal = Value(key) as JsonBoolean;

            if (boolVal != null)
            {
                return(boolVal.Value);
            }

            return(null);
        }
예제 #2
0
        public bool ValueAsBoolean(string key, bool defaultValue = false)
        {
            JsonBoolean boolVal = Value(key) as JsonBoolean;

            if (boolVal != null)
            {
                return(boolVal.Value);
            }

            return(defaultValue);
        }