mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
34 lines
680 B
Mathematica
34 lines
680 B
Mathematica
![]() |
//
|
||
|
// NSNull+JSON.m
|
||
|
// NewsBlur
|
||
|
//
|
||
|
// Created by Samuel Clay on 11/17/15.
|
||
|
// Copyright © 2015 NewsBlur. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "NSNull+JSON.h"
|
||
|
|
||
|
@implementation NSNull (JSON)
|
||
|
|
||
|
- (NSUInteger)length { return 0; }
|
||
|
|
||
|
- (NSInteger)integerValue { return 0; };
|
||
|
|
||
|
- (float)floatValue { return 0; };
|
||
|
|
||
|
- (NSString *)description { return @"0(NSNull)"; }
|
||
|
|
||
|
- (NSArray *)componentsSeparatedByString:(NSString *)separator { return @[]; }
|
||
|
|
||
|
- (id)objectForKey:(id)key { return nil; }
|
||
|
|
||
|
- (BOOL)boolValue { return NO; }
|
||
|
|
||
|
- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)aSet{
|
||
|
NSRange nullRange = {NSNotFound, 0};
|
||
|
return nullRange;
|
||
|
}
|
||
|
|
||
|
//add methods of NSString if needed
|
||
|
|
||
|
@end
|