public void SetToBoolean(object key, bool b) { if (key is int && m_cd.Type == ValueType.Array) m_cd.Array[(int)key] = new IronJSONValue(b); else if (key is string && m_cd.Type == ValueType.Object) m_cd.Obj[(string)key] = new IronJSONValue(b); else throw new InvalidKeyException(key.ToString()); }