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

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…

Contents