Skip to content

V6.0.1

Latest

Choose a tag to compare

@iAmMccc iAmMccc released this 22 Jan 11:52
· 21 commits to main since this release

🚀 v6.0.1(Release Notes)
✅ 主要更新
🟢 新增:SmartCompact 命名空间(Array / Dictionary 宽容解析)
新增 SmartCompact 命名空间,用于组织数组/字典的容错解析 Property Wrapper:
@SmartCompact.Array:对数组进行宽容解析,解析失败的元素会被自动跳过。
@SmartCompact.Dictionary:对字典进行宽容解析,解析失败的键值对会被自动跳过。
示例:

struct Model: Decodable {
    @SmartCompact.Array
    var ages: [Int]

    @SmartCompact.Dictionary
    var info: [String: Any]
}

🟡 优化:SmartCompact 设计与使用体验
统一命名空间,API 更清晰
避免 SmartCompact 误用为“万能 wrapper”
使数组/字典的宽容解析逻辑更加可控、可维护