From the course: Learn API Documentation with JSON and XML
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
JSON examples
From the course: Learn API Documentation with JSON and XML
JSON examples
- [Narrator] I'll show you examples of JSON files, one simple, and one more complex. I brought up Sublime Text here, and I'll type in an example JSON file that captures information about a song. First thing I want to do is turn on the formatting. So if we go to View, and under Syntax, and then JavaScript, there's something for JSON. So we'll turn this on, and this'll help visually see what the JSON format looks like. I'm going to start off with an object, so that means starting with curly brackets. I just type one, then both the closed and open appear. Give myself a little space. So this object is going to have a key of "song", in quotation marks. We'll put a colon here. And then we've got to have another set of curly brackets. We then indent. And we have some key-value pairs. First one is a title. This'll be the title of the song. I'll call it JSON Lullaby. Next key will be the artist, and its value is going to be The Instructors. That'll be the name of our group here, singing the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
JSON basics2m 45s
-
(Locked)
JSON examples6m 14s
-
(Locked)
Create JSON challenge37s
-
(Locked)
Create JSON solution1m 22s
-
(Locked)
Documenting one-level JSON responses2m 28s
-
(Locked)
Documenting nested JSON responses6m 7s
-
(Locked)
Documenting JSON requests5m 32s
-
(Locked)
Documenting JSON challenge35s
-
(Locked)
Documenting JSON solution2m 47s
-
-
-
-