             fieldType = "\(subTypeName)?"
         case .Unknown:
             fieldType = subName.camelCasedString
-            declaration = "typealias \(fieldType) = Void // TODO Specify type here. We couldn't infer it from json".indent(level)
+            declaration = "\(typeVisibility.visibilityPrefix)typealias \(fieldType) = Void // TODO Specify type here. We couldn't infer it from json".indent(level)
         }
         return (fieldType, declaration)
     }
     
     private func createStructDeclaration(name: String, fields: Set<ModelParser.ObjectField>, level: Int = 0) -> String {
-        var ret = "\(objectType.name) \(name) {".indent(level)
+        var ret = "\(typeVisibility.visibilityPrefix)\(objectType.name) \(name) {".indent(level)
         let fieldsAndTypes = fields.sort{$0.0.name < $0.1.name}.map { f -> (field: String, type: String?) in
             var fieldDeclaration = ""
             let (typeName, subTypeDeclaration) = makeSubtype(f.type, name: name, subName: f.name, level: level + 1)
             let varModifier = mutableFields ? "var" : "let"
-            let visibility = fieldVisibility == .Internal ? "" : "\(fieldVisibility) "
-            fieldDeclaration += ("\(visibility)\(varModifier) \(f.name.pascalCasedString.asValidSwiftIdentifier.swiftKeywordEscaped): \(typeName)")
+            fieldDeclaration += ("\(fieldVisibility.visibilityPrefix)\(varModifier) \(f.name.pascalCasedString.asValidSwiftIdentifier.swiftKeywordEscaped): \(typeName)")
             return (fieldDeclaration, subTypeDeclaration)
         }
         let typeDeclarations = fieldsAndTypes.lazy.flatMap {$0.type}

    func translate(type: ModelParser.FieldType, name: String) -> String {
        let (parsers, instructions, typeName) = createParsers(type, parentTypeNames: [name], valueExpression: "jsonValue")
        
        let declarations = parsers.sort { $0.0.priority > $0.1.priority }.lazy.map { $0.text }.joinWithSeparator("\n\n")
        let parseFunction = [
            "",
            "",

        if let decl = decl {
            return decl
        }
        return "\(typeVisibility.visibilityPrefix)typealias \(name) = \(typeName)"
    }
    
    private func makeSubtype(type: ModelParser.FieldType, name: String, subName: String, level: Int) -> (name: String, declaration: String?) {
