修复 Word 解码失败:自定义 CodingKeys 排除 categoryId,避免 JSON 解析报错
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -20,4 +20,8 @@ struct Word: Codable, Identifiable, Hashable {
|
||||
let meaning: String
|
||||
let example: String
|
||||
let exampleMeaning: String
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case word, phonetic, meaning, example, exampleMeaning
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user