AFJSONResponseSerializer Class Reference
| Inherits from | AFHTTPResponseSerializer : NSObject |
| Declared in | AFURLResponseSerialization.h AFURLResponseSerialization.m |
Overview
AFJSONResponseSerializer is a subclass of AFHTTPResponseSerializer that validates and decodes JSON responses.
By default, AFJSONResponseSerializer accepts the following MIME types, which includes the official standard, application/json, as well as other commonly-used types:
application/jsontext/jsontext/javascript
Properties
readingOptions
Options for reading the response JSON data and creating the Foundation objects. For possible values, see the NSJSONSerialization documentation section “NSJSONReadingOptions”. 0 by default.
@property (nonatomic, assign) NSJSONReadingOptions readingOptionsDeclared In
AFURLResponseSerialization.hClass Methods
serializer
Creates and returns a serializer with default configuration.
+ (instancetype)serializerDeclared In
AFURLResponseSerialization.hserializerWithReadingOptions:
Creates and returns a JSON serializer with specified reading and writing options.
+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptionsParameters
- readingOptions
The specified JSON reading options.
Declared In
AFURLResponseSerialization.h