自定义解析规则mapping 方法中不支持一个字段对应多个Json中的字段吗?
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
有个疑问:自定义解析规则mapping 方法中不支持一个字段对应多个Json中的字段吗?
/// 自定义解析规则
override func mapping(mapper: HelpingMapper) {
// specify 'cat_id' field in json map to 'id' property in object
mapper <<<
self.id <-- ["cat_id","id"] //测试了一下,好像也支持解析多个json字段哦,棒棒棒的
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the custom mapping(mapper:) example in the issue and inspect how the mapper handles ["cat_id", "id"]. Reproduce the example to confirm whether multiple JSON fields are supported and how conflicts are handled. Done means the behavior is confirmed and clearly documented, or the issue is closed if no change is needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100