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

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

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

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

            return(defaultValue);
        }