TouchCode / TouchJSON

A humane JSON Objective-C un-framework. (TouchJSON has been deprecated - see README)
http://touchcode.com/
Other
800 stars 169 forks source link

The self.tests and self.theConvertersByName is always nil in original cod #13

Closed fbzhong closed 13 years ago

fbzhong commented 13 years ago

The self.tests and self.theConvertersByName is always nil in original codes, because [nil setByAddingObject] returns nil, [nil mutableCopy] return nil. That cause the customized convert function will not be invoked.

The fix is quite simple, create a instance of NSSet and NSDictionary make it works. However, I think the better patch is use NSMutableSet and NSMutableDictionary, which allow us add more objects without copy it.