KakaJson json 转模型 关键字id映射其它字段
2023-12-20 本文已影响0人
笨的很想飞
swift
func kj_modelKey(from property: Property) -> ModelPropertyKey {
switch property.name {
case "idField":
return "id";
default:
return property.name;
}
}
OC
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
return @{@"idField": @"id"};
}