From the course: JSON Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Work with schema generators - JavaScript Tutorial
From the course: JSON Essential Training
Work with schema generators
- [Instructor] Building a JSON schema from scratch can be a challenging and tedious process. You can get a leg up on coding the components and the basic structure though by using a schema generator, like the one at jsonschema.net. A schema generator allows you to enter an example of valid JSON that you want to validate, and choose some schema options. It then automatically generates a schema that fits your data and any selections you've made. The H+ Sport API can return a number of different categories of data, including data on people. In the code for this video, the data is stored in the data.js file, in the rawPersonData variable, which is on line three. It consists of a single property, cards, containing an array of objects. Each object contains three properties, and two of those properties contain sub-objects as values. So there are a number of levels in this data, and several different properties scattered…
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)
-
-