             patchedJSON[patch.entry].object = patch.value
             
         case .add:
-            guard let array = field.array else {
+            if let array = field.array {
+                guard array.first(where:{$0.stringValue == patch.value.description}) == nil else {
+                    fatalError("Attempting to add field \"\(patch.value)\" to array \(patch.entry) that aleady exists.")
+                }
+                
+                var newArray = field.arrayObject!
+                newArray.append(patch.value)
+                patchedJSON[patch.entry].arrayObject = newArray
+            } else if let _ = field.dictionary {
+                guard let key = patch.key else {
+                    fatalError("Attempting to add to dictionary \(patch.entry) without supplying a key value")
+                }
+                let entry : [JSONSubscriptType] = patch.entry + [key]
+                patchedJSON[entry].object = patch.value
+            } else {
                 fatalError("Attempting to add a field to \(patch.entry) that cannot be added to.")
             }
-
-            guard array.first(where:{$0.stringValue == patch.value.description}) == nil else {
-                fatalError("Attempting to add field \"\(patch.value)\" to array \(patch.entry) that aleady exists.")
-            }
-
-            var newArray = field.arrayObject!
-            newArray.append(patch.value)
-            patchedJSON[patch.entry].arrayObject = newArray
-
         case .remove:
             if let array = field.array {
                 guard let firstIndex = array.firstIndex(where:{$0.stringValue == patch.value.description}) else {

        case remove
    }

    init(_ operation: Operation, entry: [JSONSubscriptType], value: String, originalValue: String? = nil) {
        self.operation = operation
        self.entry = entry
        self.value = value
        self.originalValue = originalValue
    }

    let operation : Operation
    let entry : [JSONSubscriptType]
    let value : CustomStringConvertible
    let originalValue : CustomStringConvertible?
}

    "S3": [
        Patch(.replace, entry:["shapes","ReplicationStatus","enum",0], value:"COMPLETED", originalValue:"COMPLETE"),
        Patch(.replace, entry:["shapes","Size","type"], value:"long", originalValue:"integer"),
        // Add additional location constraints
        Patch(.add, entry:["shapes", "BucketLocationConstraint", "enum"], value:"us-east-2"),
        Patch(.add, entry:["shapes", "BucketLocationConstraint", "enum"], value:"eu-west-2"),
        Patch(.add, entry:["shapes", "BucketLocationConstraint", "enum"], value:"eu-west-3"),
