Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NSValue bug; update example code #268

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions YYModel/NSObject+YYModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ NS_ASSUME_NONNULL_BEGIN

@interface YYAttributes
@property NSString *name;
@property NSArray *shadows;
@property NSSet *borders;
@property NSDictionary *attachments;
@property NSArray <YYShadow *> *shadows;
@property NSSet <YYBorder *> *borders;
@property NSDictionary <NSString *, YYAttachment *> *attachments;
@end

@implementation YYAttributes
Expand Down
1 change: 1 addition & 0 deletions YYModel/NSObject+YYModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ static id ModelToJSONObjectRecursive(NSObject *model) {
if ([model isKindOfClass:[NSAttributedString class]]) return ((NSAttributedString *)model).string;
if ([model isKindOfClass:[NSDate class]]) return [YYISODateFormatter() stringFromDate:(id)model];
if ([model isKindOfClass:[NSData class]]) return nil;
if ([model isKindOfClass:[NSValue class]]) return model;


_YYModelMeta *modelMeta = [_YYModelMeta metaWithClass:[model class]];
Expand Down