             }
         }
     }
+    
+    public var dictionaryValue: Dictionary<String, JSON> {
+        get {
+            return self.dictionary ?? [:]
+        }
+    }
 }
 
 //MARK: - Scalar: Bool
 extension JSON: BooleanType {
     
+    public var bool: Bool? {
+        get {
+            return self.number?.boolValue
+        }
+    }
+
     public var boolValue: Bool {
         switch self {
         case .ScalarNumber(let number):


    switch lhs {
    case JSON.ScalarNumber:
        return lhs.numberValue! <= rhs.numberValue!
    case JSON.ScalarString:
        return lhs.stringValue! <= rhs.stringValue!
    case .Sequence:
        return lhs.arrayValue! == rhs.arrayValue!
    case .Mapping:
        return lhs.dictionaryValue! == rhs.dictionaryValue!
    case .Null:
        return true
    default:

            }
        }
    }
    
    public var char: Int8? {
        get {
            return self.number?.charValue
        }
    }

    public var charValue: Int8! {
        get {
            return self.numberValue.charValue
        }
    }
    
    public var unsignedChar: UInt8? {
        get{
            return self.number?.unsignedCharValue
        }
    }
    
    public var unsignedCharValue: UInt8! {
        get{
            return self.numberValue.unsignedCharValue
        }
    }
    
    public var short: Int16? {
        get{
            return self.number?.shortValue
        }
    }
    
    public var shortValue: Int16! {
        get{
            return self.numberValue.shortValue
        }
    }
    
    public var unsignedShort: UInt16? {
        get{
            return self.number?.unsignedShortValue
        }
    }
    
    public var unsignedShortValue: UInt16! {
        get{
            return self.numberValue.unsignedShortValue
        }
    }
    
    public var long: Int? {
        get{
            return self.number?.longValue
        }
    }
    
    public var longValue: Int! {
        get{
            return self.numberValue.longValue
        }
    }
    
    public var unsignedLong: UInt? {
        get{
            return self.number?.unsignedLongValue
        }
    }
    
    public var unsignedLongValue: UInt! {
        get{
            return self.numberValue.unsignedLongValue
        }
    }
    
    public var longLong: Int64? {
        get{
            return self.number?.longLongValue
        }
    }

    public var longLongValue: Int64! {
        get{
            return self.numberValue.longLongValue
        }
    }
    
    public var unsignedLongLong: UInt64? {
        get{
            return self.number?.unsignedLongLongValue
        }
    }

    public var unsignedLongLongValue: UInt64! {
        get{
            return self.numberValue.unsignedLongLongValue
        }
    }
    
    public var float: Float? {
        get {
            return self.number?.floatValue
        }
    }
    
    public var floatValue: Float! {
        get {
            return self.numberValue.floatValue
        }
    }
    
    public var double: Double? {
        get {
            return self.number?.doubleValue
        }
    }

    public var doubleValue: Double! {
        get {
            return self.numberValue.doubleValue
        }
    }

    public var integer: Int? {
        get {
            return self.number?.integerValue
        }
    }

    public var integerValue: Int! {
        get {
            return self.numberValue.integerValue
        }
    }
    
    public var unsignedInteger: Int? {
        get {
            return self.number?.unsignedIntegerValue
        }
    }
    
    public var unsignedIntegerValue: Int! {
        get {
            return self.numberValue.unsignedIntegerValue
        }
    }
    
    public var int: Int32? {
        get {
            return self.number?.intValue
        }
    }
    
    public var intValue: Int32! {
        get {
            return self.numberValue.intValue
        }
    }
}
