-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 修复Copy接口中,source为中文时会导致403的问题
- Loading branch information
erichmzhang
committed
Apr 3, 2018
1 parent
c39d602
commit 095ceb3
Showing
11 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#5.4.3 | ||
- 修复Copy接口中,source为中文时会导致403的问题 | ||
|
||
# 5.4.2 | ||
- 修复了返回数组类型的属性,如果数组内容只有一个时候会解析失败的问题。 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
QCloudCOSXML/Classes/Manager/QCloudListAllMyBucketsResult+CustomModelTransfer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// QCloudListAllMyBucketsResult+CustomModelTransfer.h | ||
// FLEX | ||
// | ||
// Created by erichmzhang(张恒铭) on 03/04/2018. | ||
// | ||
|
||
#import <QCloudCOSXML/QCloudCOSXML.h> | ||
|
||
@interface QCloudListAllMyBucketsResult (CustomModelTransfer) | ||
|
||
@end |
46 changes: 46 additions & 0 deletions
46
QCloudCOSXML/Classes/Manager/QCloudListAllMyBucketsResult+CustomModelTransfer.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// QCloudListAllMyBucketsResult+CustomModelTransfer.m | ||
// FLEX | ||
// | ||
// Created by erichmzhang(张恒铭) on 03/04/2018. | ||
// | ||
|
||
#import "QCloudListAllMyBucketsResult+CustomModelTransfer.h" | ||
|
||
@implementation QCloudListAllMyBucketsResult (CustomModelTransfer) | ||
- (NSDictionary *)modelCustomWillTransformFromDictionary:(NSDictionary *)dic { | ||
|
||
if (!dic) { | ||
return dic; | ||
} | ||
NSMutableDictionary* transfromDic = [NSMutableDictionary dictionaryWithDictionary:dic]; | ||
NSArray* transformArrayKeypaths = @[ | ||
@"Buckets", | ||
]; | ||
|
||
for (NSString* keyPath in transformArrayKeypaths) { | ||
id object = [dic valueForKeyPath:keyPath]; | ||
if (!object) { | ||
continue; | ||
} | ||
if ([object isKindOfClass:[NSNull class]]) { | ||
continue; | ||
} | ||
if (![object isKindOfClass:[NSArray class]]) { | ||
if ([object isKindOfClass:[NSDictionary class]]) { | ||
id value = [[object allValues] firstObject]; | ||
if ([value isKindOfClass:[NSArray class]]) { | ||
[transfromDic setValue:value forKey:keyPath]; | ||
} else { | ||
[transfromDic setValue:@[value] forKey:keyPath]; | ||
} | ||
} | ||
// [transfromDic setValue:@[object] forKeyPath:keyPath]; | ||
} | ||
} | ||
|
||
return transfromDic; | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters