IronJSON.JSONManager.SetToBoolean C# (CSharp) Method

SetToBoolean() public method

public SetToBoolean ( object key, bool b ) : void
key object /// A ///
b bool /// A ///
return void
        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());
        }