-
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.
- 修复了返回数组类型的属性,如果数组内容只有一个时候会解析失败的问题。
- Loading branch information
erichmzhang
committed
Apr 2, 2018
1 parent
0ee75b0
commit c39d602
Showing
26 changed files
with
179 additions
and
181 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.2 | ||
- 修复了返回数组类型的属性,如果数组内容只有一个时候会解析失败的问题。 | ||
|
||
# 5.4.1 | ||
- 修复了 XML 中以 / 结尾的 Object 会403的的问题。 | ||
|
||
|
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
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,39 @@ | ||
// | ||
// QCloudAccessControlList.h | ||
// QCloudAccessControlList | ||
// | ||
// Created by tencent | ||
// Copyright (c) 2015年 tencent. All rights reserved. | ||
// | ||
// ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██████╗ | ||
// ██╔═══██╗██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗ | ||
// ██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║ ██║ ███████║██████╔╝ | ||
// ██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║ ██║ ██╔══██║██╔══██╗ | ||
// ╚██████╔╝╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║██║ ██║███████╗ ███████╗██║ ██║██████╔╝ | ||
// ╚══▀▀═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝ | ||
// | ||
// | ||
// _ __ _ _ | ||
// (_) / _| | | | | | ||
// ___ ___ _ ____ ___ ___ ___ | |_ ___ _ __ __| | _____ _____| | ___ _ __ ___ _ __ ___ | ||
// / __|/ _ \ '__\ \ / / |/ __/ _ \ | _/ _ \| '__| / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __| | ||
// \__ \ __/ | \ V /| | (_| __/ | || (_) | | | (_| | __/\ V / __/ | (_) | |_) | __/ | \__ | ||
// |___/\___|_| \_/ |_|\___\___| |_| \___/|_| \__,_|\___| \_/ \___|_|\___/| .__/ \___|_| |___/ | ||
// ______ ______ ______ ______ ______ ______ ______ ______ | | | ||
// |______|______|______|______|______|______|______|______| |_| | ||
// | ||
|
||
|
||
|
||
#import <Foundation/Foundation.h> | ||
#import <QCloudCore/QCloudCore.h> | ||
#import "QCloudACLGrant.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
@interface QCloudAccessControlList : NSObject | ||
/** | ||
存放被授权者信息的数组 | ||
*/ | ||
@property (strong, nonatomic) NSArray<QCloudACLGrant*> *ACLGrants; | ||
@end | ||
NS_ASSUME_NONNULL_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// | ||
// QCloudAccessControlList.m | ||
// QCloudAccessControlList | ||
// | ||
// Created by tencent | ||
// Copyright (c) 2015年 tencent. All rights reserved. | ||
// | ||
// ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██████╗ | ||
// ██╔═══██╗██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗ | ||
// ██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║ ██║ ███████║██████╔╝ | ||
// ██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║ ██║ ██╔══██║██╔══██╗ | ||
// ╚██████╔╝╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║██║ ██║███████╗ ███████╗██║ ██║██████╔╝ | ||
// ╚══▀▀═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝ | ||
// | ||
// | ||
// _ __ _ _ | ||
// (_) / _| | | | | | ||
// ___ ___ _ ____ ___ ___ ___ | |_ ___ _ __ __| | _____ _____| | ___ _ __ ___ _ __ ___ | ||
// / __|/ _ \ '__\ \ / / |/ __/ _ \ | _/ _ \| '__| / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __| | ||
// \__ \ __/ | \ V /| | (_| __/ | || (_) | | | (_| | __/\ V / __/ | (_) | |_) | __/ | \__ | ||
// |___/\___|_| \_/ |_|\___\___| |_| \___/|_| \__,_|\___| \_/ \___|_|\___/| .__/ \___|_| |___/ | ||
// ______ ______ ______ ______ ______ ______ ______ ______ | | | ||
// |______|______|______|______|______|______|______|______| |_| | ||
// | ||
|
||
|
||
#import "QCloudAccessControlList.h" | ||
|
||
#import "QCloudACLGrant.h" | ||
|
||
@class QCloudACLGrant; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
@implementation QCloudAccessControlList | ||
|
||
+ (NSDictionary *)modelContainerPropertyGenericClass | ||
{ | ||
return @ { | ||
@"ACLGrants":[QCloudACLGrant class], | ||
}; | ||
} | ||
|
||
|
||
+ (NSDictionary *)modelCustomPropertyMapper | ||
{ | ||
return @{ | ||
@"ACLGrants" :@"Grant", | ||
}; | ||
} | ||
|
||
|
||
- (BOOL)modelCustomTransformToDictionary:(NSMutableDictionary *)dic | ||
{ | ||
|
||
|
||
return YES; | ||
} | ||
|
||
- (NSDictionary *)modelCustomWillTransformFromDictionary:(NSDictionary *)dic | ||
{ | ||
if (!dic) { | ||
return dic; | ||
} | ||
NSMutableDictionary* transfromDic = [NSMutableDictionary dictionaryWithDictionary:dic]; | ||
NSArray* transformArrayKeypaths = @[ | ||
@"Grant", | ||
]; | ||
|
||
for (NSString* keyPath in transformArrayKeypaths) { | ||
id object = [dic valueForKeyPath:keyPath]; | ||
if (!object) { | ||
continue; | ||
} | ||
if ([object isKindOfClass:[NSNull class]]) { | ||
continue; | ||
} | ||
if (![object isKindOfClass:[NSArray class]]) { | ||
[transfromDic setValue:@[object] forKeyPath:keyPath]; | ||
} | ||
} | ||
|
||
return transfromDic; | ||
} | ||
|
||
@end | ||
|
||
|
||
NS_ASSUME_NONNULL_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
Oops, something went wrong.