diff --git a/YYModel/NSObject+YYModel.h b/YYModel/NSObject+YYModel.h index 73f62ec..de8a399 100644 --- a/YYModel/NSObject+YYModel.h +++ b/YYModel/NSObject+YYModel.h @@ -321,9 +321,9 @@ NS_ASSUME_NONNULL_BEGIN @interface YYAttributes @property NSString *name; - @property NSArray *shadows; - @property NSSet *borders; - @property NSDictionary *attachments; + @property NSArray *shadows; + @property NSSet *borders; + @property NSDictionary *attachments; @end @implementation YYAttributes diff --git a/YYModel/NSObject+YYModel.m b/YYModel/NSObject+YYModel.m index 3d7c470..38ee1b7 100644 --- a/YYModel/NSObject+YYModel.m +++ b/YYModel/NSObject+YYModel.m @@ -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]];