Differences From Artifact [d6830b4626]:
- File src/OFNull.m — part of check-in [3b97fc3cd9] at 2014-01-04 00:24:08 on branch trunk — Update copyright. (user: js, size: 2109) [annotate] [blame] [check-ins using]
To Artifact [3046b23b8f]:
- File
src/OFNull.m
— part of check-in
[eaa612ad50]
at
2014-02-08 09:26:40
on branch trunk
— Add -[JSONRepresentationWithOptions:]
This also adds OF_JSON_REPRESENTATION_PRETTY. (user: js, size: 2535) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFXMLElement.h" #import "OFDataArray.h" #import "OFInvalidArgumentException.h" #import "autorelease.h" #import "macros.h" static OFNull *null = nil; @implementation OFNull + (void)initialize { null = [[self alloc] init]; | > > > > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #import "OFXMLElement.h" #import "OFDataArray.h" #import "OFInvalidArgumentException.h" #import "autorelease.h" #import "macros.h" @interface OFNull (OF_PRIVATE_CATEGORY) - (OFString*)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end static OFNull *null = nil; @implementation OFNull + (void)initialize { null = [[self alloc] init]; |
︙ | ︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString*)JSONRepresentation { return @"null"; } - (OFDataArray*)messagePackRepresentation { OFDataArray *data = [OFDataArray dataArrayWithItemSize: 1 | > > > > > > > > > > > > > | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString*)JSONRepresentation { return [self OF_JSONRepresentationWithOptions: 0 depth: 0]; } - (OFString*)JSONRepresentationWithOptions: (int)options { return [self OF_JSONRepresentationWithOptions: options depth: 0]; } - (OFString*)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth { return @"null"; } - (OFDataArray*)messagePackRepresentation { OFDataArray *data = [OFDataArray dataArrayWithItemSize: 1 |
︙ | ︙ |