Objective-C Language NSJSONSerialization

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • (id)JSONObjectWithData:(NSData *)data options:(NSJSONReadingOptions)opt error:(NSError * _Nullable *)error

Parameters

OperatorDescription
dataA data object containing JSON data
optOptions for reading the JSON data and creating the Foundation objects.
errorIf an error occurs, upon return contains an NSError object that describes the problem.

Remarks

NSJSONSerialization is Available in iOS 5.0 and later An object that may be converted to JSON must have the following properties:

  • The top level object is an NSArray or NSDictionary.

  • All objects are instances of NSString, NSNumber, NSArray, NSDictionary, or NSNull.

  • All dictionary keys are instances of NSString.

  • Numbers are not NaN or infinity.



Got any Objective-C Language Question?