From the course: JSON Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
What is JSON Schema? - JavaScript Tutorial
From the course: JSON Essential Training
What is JSON Schema?
- [Instructor] What happens when you make a request for JSON data and the data you receive is different than what you expect? What if the JSON is organized differently than your code expects, or it's simply not a valid response to your request? To identify and deal with situations like these, you can use a schema. A schema is essentially a blueprint for what data should look like. You can create a schema for the data you expect to receive, and then provide that schema to the code that handles the data. Your code can compare the schema to the data and verify either that the data is the type you expected or that there's a problem that needs handling. JSON Schema is a standard for creating schemas for JSON data. It was created by the internet engineering task force. To create a schema using JSON Schema, you create JSON using a specific structure and keywords along with values you specify. You can then write code to…
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
-
-
-
-
-
-
-
(Locked)
What is JSON Schema?2m 57s
-
(Locked)
Create a basic schema with JSON Schema6m 47s
-
(Locked)
Validate JSON data against a schema3m 42s
-
(Locked)
Specify required properties with JSON Schema4m 59s
-
(Locked)
Work with schema generators7m 29s
-
(Locked)
Challenge: Work with JSON Schema52s
-
(Locked)
Solution: Work with JSON Schema4m 23s
-
(Locked)
-
-