Does Mantle already converts int values 0 and 1 in JSON to objective-C BOOL values?
I have a model:
@interface MyModel : MTLModel
@property (nonatomic, readonly) BOOL isValid;
@end
And lets say JSON is:
{ is_valid: 0 } OR { is_valid: 1 }
I want to know if Mantle would automatically convert is_valid
into Objective-C BOOL value to do I have to explicity mention the following:
+ (NSValueTransformer)isValidJSONTransfermer {
return [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{@(0) : @(NO),
@(1) : @(YES)}];
}