We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49333df commit f38d9f6Copy full SHA for f38d9f6
1 file changed
src/main/kotlin/stageguard/sctimetable/api/edu_system/super/SuperCourseApiService.kt
@@ -107,9 +107,9 @@ object SuperCourseApiService {
107
//超级课表的api可真是狗屎,逼我自定义一个Either
108
val result = (response.content.readUTF8Line() ?: "{\"data\":{\"errorStr\":\"Empty response content.\"},\"status\":1}")
109
if(Pattern.compile("errorStr").matcher(result).find()) {
110
- Either.Right(Json.decodeFromString(result))
+ Either.Right(Json { ignoreUnknownKeys = true }.decodeFromString(result))
111
} else {
112
- Either.Left(Json.decodeFromString(result))
+ Either.Left(Json { ignoreUnknownKeys = true }.decodeFromString(result))
113
}
114
115
0 commit comments