0Pricing
Objective-C iOS Development for Legacy & Enterprise Apps · Lesson

Parsing JSON with NSJSONSerialization

Turn API responses into usable Objective-C objects with NSJSONSerialization, and safely navigate the resulting dictionaries and arrays.

JSON Meets Objective-C

Most APIs return JSON. Objective-C parses it with the Foundation class NSJSONSerialization, mapping JSON to native objects you already know.

The Type Mapping

JSON maps to Foundation types:

  • object -> NSDictionary
  • array -> NSArray
  • string -> NSString
  • number/bool -> NSNumber
  • null -> NSNull

All lessons in this course

  1. NSURLSession for API Calls
  2. Grand Central Dispatch (GCD)
  3. NSOperationQueue for Complex Tasks
  4. Parsing JSON with NSJSONSerialization
← Back to Objective-C iOS Development for Legacy & Enterprise Apps