Skip to content

Commit 43ff564

Browse files
committed
documentation enhancement.
1 parent d06bebb commit 43ff564

10 files changed

Lines changed: 33 additions & 33 deletions

File tree

‎JSONModel/JSONModel/JSONModel.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
152152
* Create a new model instance and initialize it with the JSON from a text parameter. The method assumes UTF8 encoded input text.
153153
* @param string JSON text data
154154
* @param err an initialization error or nil
155-
* @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON,
155+
* @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
156156
* or a property type in your model is not supported by JSONValueTransformer and its categories
157157
* @see initWithString:usingEncoding:error: for use of custom text encodings
158158
*/
@@ -163,7 +163,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
163163
* @param string JSON text data
164164
* @param encoding the text encoding to use when parsing the string (see NSStringEncoding)
165165
* @param err an initialization error or nil
166-
* @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON,
166+
* @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
167167
* or a property type in your model is not supported by JSONValueTransformer and its categories
168168
*/
169169
-(instancetype)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding error:(JSONModelError**)err;
@@ -222,7 +222,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
222222
*
223223
* @param array list of dictionaries to be imported as models
224224
* @return list of initialized data model objects
225-
* @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON,
225+
* @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
226226
* or a property type in your model is not supported by JSONValueTransformer and its categories
227227
* @exception JSONModelInvalidDataException thrown when the input data does not include all required keys
228228
* @see arrayOfDictionariesFromModels:
@@ -237,7 +237,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
237237
* matching dictionaries. This method does the opposite of arrayOfObjectsFromDictionaries:
238238
* @param array list of JSONModel objects
239239
* @return a list of NSDictionary objects
240-
* @exception JSONModelTypeNotAllowedException thrown when unsported type is found in the incoming JSON,
240+
* @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
241241
* or a property type in your model is not supported by JSONValueTransformer and its categories
242242
* @see arrayOfModelsFromDictionaries:
243243
*/
@@ -275,7 +275,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
275275
/**
276276
* Overwrite the validate method in your own models if you need to perform some custom validation over the model data.
277277
* This method gets called at the very end of the JSONModel initializer, thus the model is in the state that you would
278-
* get it back when initialzed. Check the values of any property that needs to be validated and if any invalid values
278+
* get it back when initialized. Check the values of any property that needs to be validated and if any invalid values
279279
* are encountered return NO and set the error parameter to an NSError object. If the model is valid return YES.
280280
*
281281
* NB: Only setting the error parameter is not enough to fail the validation, you also need to return a NO value.
@@ -297,7 +297,7 @@ lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
297297
* Sets a key mapper which affects ALL the models in your project. Use this if you need only one mapper to work
298298
* with your API. For example if you are using the [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase] it is more
299299
* likely that you will need to use it with ALL of your models.
300-
* NB: Custom key mappers take precendence over the global key mapper.
300+
* NB: Custom key mappers take precedence over the global key mapper.
301301
* @param globalKeyMapper a key mapper to apply to all models in your project.
302302
*
303303
* Lookup JSONKeyMapper docs for more details.

‎JSONModel/JSONModel/JSONModel.m‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM
393393
} else {
394394

395395
// 2) check if there's a protocol to the property
396-
// ) might or not be the case there's a built in transofrm for it
396+
// ) might or not be the case there's a built in transform for it
397397
if (property.protocol) {
398398

399399
//JMLog(@"proto: %@", p.protocol);
@@ -476,7 +476,7 @@ -(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyM
476476
} else {
477477

478478
// it's not a JSON data type, and there's no transformer for it
479-
// if property type is not supported - that's a programmer mistaked -> exception
479+
// if property type is not supported - that's a programmer mistake -> exception
480480
@throw [NSException exceptionWithName:@"Type not allowed"
481481
reason:[NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]
482482
userInfo:nil];
@@ -799,7 +799,7 @@ -(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:(
799799
return value;
800800
}
801801

802-
//built-in reverse transormations (export to JSON compliant objects)
802+
//built-in reverse transformations (export to JSON compliant objects)
803803
-(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property
804804
{
805805
Class protocolClass = NSClassFromString(property.protocol);
@@ -1048,7 +1048,7 @@ -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames
10481048
} else {
10491049

10501050
//in this case most probably a custom property was defined in a model
1051-
//but no default reverse transofrmer for it
1051+
//but no default reverse transformer for it
10521052
@throw [NSException exceptionWithName:@"Value transformer not found"
10531053
reason:[NSString stringWithFormat:@"[JSONValueTransformer %@] not found", selectorName]
10541054
userInfo:nil];

‎JSONModel/JSONModel/JSONModelArray.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*
5151
* Will return nil if no matching model is found. Will return nil if there's no index property
5252
* defined on the models found in the array (will sample the first object, assuming the array
53-
* contains homogenous collection of objects)
53+
* contains homogeneous collection of objects)
5454
*
5555
* @param indexValue the id value to search for
5656
* @return the found model or nil

‎JSONModel/JSONModelCategories/NSArray+JSONModel.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* Will return nil if no matching model is found. Will return nil if there's no index property
3131
* defined on the models found in the array (will sample the first object, assuming the array
32-
* contains homogenous collection of objects)
32+
* contains homogeneous collection of objects)
3333
*
3434
* @param indexValue the id value to search for
3535
* @return the found model or nil

‎JSONModel/JSONModelNetworking/JSONAPI.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
/** @name Making GET API requests */
4848
/**
49-
* Makes an asynchronious GET request to the API
49+
* Makes an asynchronous GET request to the API
5050
* @param path the URL path to add to the base API URL for this HTTP call
5151
* @param params the variables to pass to the API
5252
* @param completeBlock a JSONObjectBlock block to execute upon completion
@@ -68,7 +68,7 @@
6868

6969
/** @name JSON RPC methods */
7070
/**
71-
* Makes an asynchronious JSON RPC request to the API. Read more: http://www.jsonrpc.org
71+
* Makes an asynchronous JSON RPC request to the API. Read more: http://www.jsonrpc.org
7272
* @param method the HTTP method name; GET or POST only
7373
* @param args the list of arguments to pass to the API
7474
* @param completeBlock JSONObjectBlock to execute upon completion
@@ -77,7 +77,7 @@
7777

7878
/** @name JSON RPC (2.0) request method */
7979
/**
80-
* Makes an asynchronious JSON RPC 2.0 request to the API. Read more: http://www.jsonrpc.org
80+
* Makes an asynchronous JSON RPC 2.0 request to the API. Read more: http://www.jsonrpc.org
8181
* @param method the HTTP method name; GET or POST only
8282
* @param params the params to pass to the API - an NSArray or an NSDictionary,
8383
* depending whether you're using named or unnamed parameters

‎JSONModel/JSONModelNetworking/JSONHTTPClient.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern NSString* const kContentTypeWWWEncoded;
3333

3434
/**
3535
* A block type to handle incoming JSON object and an error.
36-
* You pass it to methods which fetch JSON asynchroniously. When the operation is finished
36+
* You pass it to methods which fetch JSON asynchronously. When the operation is finished
3737
* you receive back the fetched JSON (or nil) and an error (or nil)
3838
*
3939
* @param json object derived from a JSON string
@@ -55,7 +55,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err);
5555

5656
/** @name HTTP Client configuration */
5757
/**
58-
* Returns a modifyable dictionary of the client's default HTTP headers.
58+
* Returns a modifiable dictionary of the client's default HTTP headers.
5959
* @result A mutable dictionary of pairs - HTTP header names and values.
6060
* @discussion You can use the result to modify the http client headers like so:
6161
* <pre>
@@ -86,17 +86,17 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err);
8686
+(void)setTimeoutInSeconds:(int)seconds;
8787

8888
/**
89-
* A method to set the default conent type of the request body
89+
* A method to set the default content type of the request body
9090
* By default the content type is set to kContentTypeAutomatic
9191
* which checks the body request and decides between "application/json"
9292
* and "application/x-www-form-urlencoded"
9393
*/
9494
+(void)setRequestContentType:(NSString*)contentTypeString;
9595

9696
/////////////////////////////////////////////////////////////////////////////////////////////
97-
#pragma mark - GET asynchronious JSON calls
97+
#pragma mark - GET asynchronous JSON calls
9898

99-
/** @name Making asynchronious HTTP requests */
99+
/** @name Making asynchronous HTTP requests */
100100
/**
101101
* Makes GET request to the given URL address and fetches a JSON response.
102102
* @param urlString the URL as a string
@@ -145,7 +145,7 @@ typedef void (^JSONObjectBlock)(id json, JSONModelError* err);
145145
+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock;
146146

147147
/////////////////////////////////////////////////////////////////////////////////////////////
148-
#pragma mark - POST synchronious JSON calls
148+
#pragma mark - POST synchronous JSON calls
149149

150150
/**
151151
* Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body.

‎JSONModel/JSONModelNetworking/JSONModel+networking.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ typedef void (^JSONModelBlock)(id model, JSONModelError* err);
2828
@interface JSONModel(Networking)
2929

3030
@property (assign, nonatomic) BOOL isLoading;
31-
/** @name Asynchroniously create a model over the network */
31+
/** @name Asynchronously create a model over the network */
3232
/**
33-
* Asynchroniously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL
33+
* Asynchronously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL
3434
* @param urlString the absolute URL address of the JSON feed as a string
3535
* @param completeBlock JSONModelBlock executed upon completion. The JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* e); the first parameter is the initialized model or nil,
3636
* and second parameter holds the model initialization error, if any

‎JSONModel/JSONModelTransformations/JSONKeyMapper.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName);
5050
*/
5151
@interface JSONKeyMapper : NSObject
5252

53-
/** @name Name convertors */
53+
/** @name Name converters */
5454
/** Block, which takes in a JSON key and converts it to the corresponding property name */
5555
@property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock;
5656

5757
/** Block, which takes in a property name and converts it to the corresponding JSON key name */
5858
@property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock;
5959

60-
/** Combined convertor method
60+
/** Combined converter method
6161
* @param value the source name
6262
* @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock
6363
* @return JSONKeyMapper instance

‎JSONModel/JSONModelTransformations/JSONValueTransformer.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/////////////////////////////////////////////////////////////////////////////////////////////
2121

22-
#pragma mark - extern definitons
22+
#pragma mark - extern definitions
2323
/**
2424
* Boolean function to check for null values. Handy when you need to both check
2525
* for nil and [NSNUll null]
@@ -48,34 +48,34 @@ extern BOOL isNull(id value);
4848

4949
/** @name Resolving cluster class names */
5050
/**
51-
* This method returns the ubmrella class for any standard class cluster members.
51+
* This method returns the umbrella class for any standard class cluster members.
5252
* For example returns NSString when given as input NSString, NSMutableString, __CFString and __CFConstantString
5353
* The method currently looksup a pre-defined list.
54-
* @param sourceClass the class to get the umrella class for
54+
* @param sourceClass the class to get the umbrella class for
5555
* @return Class
5656
*/
5757
+(Class)classByResolvingClusterClasses:(Class)sourceClass;
5858

5959
#pragma mark - NSMutableString <-> NSString
6060
/** @name Transforming to Mutable copies */
6161
/**
62-
* Trasnforms a string value to a mutable string value
62+
* Transforms a string value to a mutable string value
6363
* @param string incoming string
6464
* @return mutable string
6565
*/
6666
-(NSMutableString*)NSMutableStringFromNSString:(NSString*)string;
6767

6868
#pragma mark - NSMutableArray <-> NSArray
6969
/**
70-
* Trasnforms an array to a mutable array
70+
* Transforms an array to a mutable array
7171
* @param array incoming array
7272
* @return mutable array
7373
*/
7474
-(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array;
7575

7676
#pragma mark - NS(Mutable)Array <- JSONModelArray
7777
/**
78-
* Trasnforms an array to a JSONModelArray
78+
* Transforms an array to a JSONModelArray
7979
* @param array incoming array
8080
* @return JSONModelArray
8181
*/
@@ -84,7 +84,7 @@ extern BOOL isNull(id value);
8484

8585
#pragma mark - NSMutableDictionary <-> NSDictionary
8686
/**
87-
* Trasnforms a dictionary to a mutable dictionary
87+
* Transforms a dictionary to a mutable dictionary
8888
* @param dict incoming dictionary
8989
* @return mutable dictionary
9090
*/

‎JSONModel/JSONModelTransformations/JSONValueTransformer.m‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ -(id)init
3333
self = [super init];
3434
if (self) {
3535
_primitivesNames = @{@"f":@"float", @"i":@"int", @"d":@"double", @"l":@"long", @"c":@"BOOL", @"s":@"short", @"q":@"long",
36-
//and some famos aliases of primitive types
36+
//and some famous aliases of primitive types
3737
// BOOL is now "B" on iOS __LP64 builds
3838
@"I":@"NSInteger", @"Q":@"NSUInteger", @"B":@"BOOL",
3939

0 commit comments

Comments
 (0)