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?

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…

Contents