public IsBoolean ( object key ) : bool | ||
key | object |
/// A |
Результат | bool |
public bool IsBoolean(object key)
{
if (key is int && m_cd.Type == ValueType.Array)
{
IronJSONValue val = (IronJSONValue)m_cd.Array[(int)key];
return val.Type == ValueType.True ||
val.Type == ValueType.False;
}
else if (key is string && m_cd.Type == ValueType.Object)
{
IronJSONValue val = m_cd.Obj[(string)key];
return val.Type == ValueType.True ||
val.Type == ValueType.False;
}
else
throw new InvalidKeyException(key.ToString());
}