 import RxSwift
 
 struct Exam: Codable, Identifiable, Equatable {
-    enum ExamType: String, Codable {
-        case s = "SP", m = "MP", a = "APL"
+    enum ExamType: Codable, Equatable {
+        case s, m, a, other(String)
 		
+        init(from decoder: Decoder) throws {
+            let content = try decoder.singleValueContainer().decode(String.self)
+            switch content {
+            case "SP": self = .s
+            case "MP": self = .m
+            case "APL": self = .a
+            default: self = .other(content)
+            }
+        }
+        
+        func encode(to encoder: Encoder) throws {
+            let c: String
+            switch self {
+            case .s: c = "SP"
+            case .m: c = "MP"
+            case .a: c = "APL"
+            case .other(let content): c = content
+            }
+            var container = encoder.singleValueContainer()
+            try container.encode(c)
+        }
+        
 		var displayName: String {
 			switch self {
 			case .s:

				return Loca.Exams.ExamType.oral
			case .a:
				return Loca.Exams.ExamType.apl
			}
		}
    }
    
    let title: String

    let examiner: String
    let rooms: [String]
    
    // TODO: This should be improved, just to show something
    let day: String
    let start: String
    let end: String
    
    private enum CodingKeys: String, CodingKey {
        case title = "Title"
        case type = "ExamType"
        case branch = "StudyBranch"
        case examiner = "Examiner"
        case rooms = "Rooms"
        case day = "Day"
        case start = "StartTime"
        case end = "EndTime"
    }

    static func ==(lhs: Exam, rhs: Exam) -> Bool {
