Add support for parameterizing NSSet. refs #1010

This commit is contained in:
Blake Watters
2012-12-11 21:31:40 -05:00
parent b9457ce65c
commit ae6b58d7bc
2 changed files with 22 additions and 0 deletions

View File

@@ -111,6 +111,9 @@
} else if ([value isKindOfClass:[NSDecimalNumber class]]) {
// Precision numbers are serialized as strings to work around Javascript notation limits
transformedValue = [(NSDecimalNumber *)value stringValue];
} else if ([value isKindOfClass:[NSSet class]]) {
// NSSets are not natively serializable, so let's just turn it into an NSArray
transformedValue = [value allObjects];
} else if ([value isKindOfClass:[NSOrderedSet class]]) {
// NSOrderedSets are not natively serializable, so let's just turn it into an NSArray
transformedValue = [value array];