     
     subscript(key: String) -> JSONValue {
         get {
-            switch self{
+            switch self {
             case .JObject(let jsonDictionary):
-                if let value = jsonDictionary[key]{
+                if let value = jsonDictionary[key] {
                     return value
-                }else{
+                }else {
                     return JSONValue.JInvalid
                 }
             default:

        case let value as NSData:
            if let jsonObject : AnyObject = NSJSONSerialization.JSONObjectWithData(value, options: NSJSONReadingOptions.MutableContainers, error: nil){
                self = JSONValue(jsonObject)
            }else{
                self = JSONValue.JInvalid
            }
        case let value as NSNumber:
            if String.fromCString(value.objCType) == "c"{
                self = .JBool(value.boolValue)
                return
            }

            self = .JNull
        case let value as NSArray:
            var jsonValues = JSONValue[]()
            for possibleJsonValue : AnyObject in value {
                let jsonValue = JSONValue(possibleJsonValue)
                if  jsonValue {
                    jsonValues.append(jsonValue)
                }
            }
            self = .JArray(jsonValues)
        case let value as NSDictionary:
            var jsonObject = Dictionary<String, JSONValue>()
            for (possibleJsonKey : AnyObject, possibleJsonValue : AnyObject) in value {
                if let key = possibleJsonKey as? NSString {
                    let jsonValue = JSONValue(possibleJsonValue)
                    if jsonValue {
                        jsonObject[key] = jsonValue
                    }
                }
            }
