O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Aaron Hillegass, Christian Keur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JSON Data

JSON data, especially when it is condensed like it is in your console, may seem daunting. However, it is actually a very simple syntax. JSON can contain the most basic types used to represent model objects: arrays, dictionaries, strings, and numbers. A JSON dictionary contains one or more key-value pairs, where the key is a string and the value can be another dictionary or a string, number, or array. An array can consist of strings, numbers, dictionaries, and other arrays. Thus, a JSON document is a nested set of these types of values.

Here is an example of some really simple JSON:

{​ ​ ​ ​ ​"​n​a​m​e​"​ ​:​ ​"​C​h​r​i​s​t​i​a​n​"​,​ ​ ​ ​ ​"​f​r​i​e​n​d​s​"​ ​:​ ​[​"​S​t​a​c​y​"​,​ ​"​M​i​k​e​y​"​]​,​ ​ ​ ​ ​"​j​o​b​"​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required