     }
     
     var swiftifiedJSON: String = ""
+    var indentLevel = 0
+    var indentString: String {
+        return String(repeating: " ", count: self.indentLevel * 4)
+    }
     
     func swiftifyJSON(_ value: JSONValueNode, with name: String?) throws {
         var swiftOutput = ""

        }
        
        func swiftifyInit() -> String {
            var swiftOutput = "init(json: JSON) {\n"
            for key in object.children.keys {
                if let value: JSONValueNode = object.children[key] {
                    swiftOutput += swiftifyValueInstantiation(for: key, and: value)
                }
            }
            swiftOutput += "}\n"
            return swiftOutput
        }
        
        func swiftifyValueInstantiation(for key: String, and value: JSONValueNode) -> String {
            var swiftOutput = ""
            swiftOutput += "self.\(key.camelCased) = \(swiftifyAssignment(for: "json[\"\(key)\"]", and: value))"
            return swiftOutput
        }
        
        func swiftifyAssignment(for key: String, and value: JSONValueNode) -> String {
            var swiftOutput = ""
            if let object = value as? JSONObjectNode {
                swiftOutput += "\(object.type)(json: \(key))\n"
            } else if let array = value as? JSONArrayNode {
                swiftOutput += "\(key).arrayValue.map({ element in\n"
                if let first = array.elements.first {
                    swiftOutput += "return \(swiftifyAssignment(for: "element", and: first))"
                } else {
                    swiftOutput += "return 0\n"
                }
                swiftOutput += "})\n"
            } else {
                swiftOutput += "\(key).\(value.type.lowercased())Value\n"
            }

            var swiftOutput: String = ""
            for key in object.children.keys {
                if let value = object.children[key] as? JSONObjectNode {
                    swiftOutput += "\n\(swiftifyObject(value))"
                } else if var value = object.children[key] as? JSONArrayNode {
                    while let first = value.elements.first as? JSONArrayNode {
                        value = first
                    }
                    if let first = value.elements.first as? JSONObjectNode {
                        swiftOutput += "\n\(swiftifyObject(first))"
                    }
                }
            }
            return swiftOutput
        }
        
        var swiftOutput = ""
        swiftOutput += self.indentString + "class \(object.name) {\n"
        self.indentLevel += 1
        swiftOutput += swiftifyVariableDeclarations()
        swiftOutput += swiftifyInit()
        swiftOutput += swiftifyClassDeclarations()
        self.indentLevel -= 1
        swiftOutput += self.indentString + "}\n"
        return swiftOutput
    }
}
