LCJSONRequestSerializer
Objective-C
@interface LCJSONRequestSerializer : LCHTTPRequestSerializer
Swift
class LCJSONRequestSerializer : LCHTTPRequestSerializer
LCJSONRequestSerializer is a subclass of LCHTTPRequestSerializer that encodes parameters as JSON using NSJSONSerialization, setting the Content-Type of the encoded request to application/json.
-
Options for writing the request JSON data from Foundation objects. For possible values, see the
NSJSONSerializationdocumentation section “NSJSONWritingOptions”.0by default.Declaration
Objective-C
@property (nonatomic) NSJSONWritingOptions writingOptions;Swift
var writingOptions: JSONSerialization.WritingOptions { get set } -
Creates and returns a JSON serializer with specified reading and writing options.
Declaration
Objective-C
+ (nonnull instancetype)serializerWithWritingOptions: (NSJSONWritingOptions)writingOptions;Swift
convenience init(writingOptions: JSONSerialization.WritingOptions = [])Parameters
writingOptionsThe specified JSON writing options.
View on GitHub
Install in Dash
LCJSONRequestSerializer Class Reference