public bool toBool() { if (null != obj && obj.GetType() == typeof(string)) { return(bool.Parse(obj.ToString())); } return(JSONTools.ReadBool(obj)); }
public static bool ReadBool(Dictionary <string, object> inDict, string inBoolName, bool inDefaultValue = false) { bool returnVal = inDefaultValue; if (inDict.ContainsKey(inBoolName) == true) { returnVal = (bool)JSONTools.ReadBool(inDict[inBoolName]); } return(returnVal); }