     
     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 .JObject(let object):
            var objectString = "{\n"
            var (index, count) = (0, object.count)
            for (key, value) in object{
                let valueString = value.printableString(indent + "  ")
                if index != count - 1{
                    objectString += "\(indent)  \"\(key)\":\(valueString),\n"
                }else{
                    objectString += "\(indent)  \"\(key)\":\(valueString)\n"
                }
                index += 1

            return nil
        }
    }
    var bool:Bool? {
        switch self {
        case .JBool(let value):
            return value
        default:
            return nil
        }
    }
    var array:Array<JSONValue>? {
        switch self {
        case .JArray(let value):
            return value
        default:
            return nil
        }
    }
    var object:Dictionary<String, JSONValue>? {
        switch self {
        case .JObject(let value):
            return value
        default:
