From c198eaf25107ed183441d0a794d801f2fdce3200 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Tue, 20 Mar 2012 10:23:57 -0700 Subject: [PATCH] Adding notes in documentation about JSON libraries necessary for decoding responses in AFJSONRequestOperation and encoding requests in AFHTTPClient --- AFNetworking/AFHTTPClient.h | 2 ++ AFNetworking/AFJSONRequestOperation.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 3fce876..687b9fd 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -139,6 +139,8 @@ extern NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *paramete /** The `AFHTTPClientParameterEncoding` value corresponding to how parameters are encoded into a request body. This is `AFFormURLParameterEncoding` by default. + + @warning JSON encoding will automatically use JSONKit, SBJSON, YAJL, or NextiveJSON, if provided. Otherwise, the built-in `NSJSONSerialization` class is used, if available (iOS 5.0 and Mac OS 10.7). If the build target does not either support `NSJSONSerialization` or include a third-party JSON library, a runtime exception will be thrown when attempting to encode parameters as JSON. */ @property (nonatomic, assign) AFHTTPClientParameterEncoding parameterEncoding; diff --git a/AFNetworking/AFJSONRequestOperation.h b/AFNetworking/AFJSONRequestOperation.h index 70d003c..7c6a579 100644 --- a/AFNetworking/AFJSONRequestOperation.h +++ b/AFNetworking/AFJSONRequestOperation.h @@ -32,6 +32,8 @@ - `application/json` - `text/json` + + @warning JSON parsing will automatically use JSONKit, SBJSON, YAJL, or NextiveJSON, if provided. Otherwise, the built-in `NSJSONSerialization` class is used, if available (iOS 5.0 and Mac OS 10.7). If the build target does not either support `NSJSONSerialization` or include a third-party JSON library, a runtime exception will be thrown when attempting to parse a JSON request. */ @interface AFJSONRequestOperation : AFHTTPRequestOperation { @private