An introduction to JSON Schema

Colin Wren
The Startup
Published in
8 min readMay 15, 2020

--

Photo by Daniel McCullough on Unsplash

Recently I’ve been building an API around the FRESH resume schema, a JSON schema to describe a person’s experiences that can be used to generate a resume.

When I initially started using the schema I wasn’t really aware of what a JSON schema was, viewing it as just another way of bringing types into JavaScript (I’m not a big fan of statically typed languages so I disregarded it as another fad, similar to TypeScript).

Now I’ve built the API I’ve come to better understand the benefits a JSON schema offers and some of the tooling available that makes working with JSON schema so much easier.

Understanding JSON schema and it’s applications will not only be beneficial to developers but also to testers and even to less technical members of the team as it allows static testing of data the system uses and returns allowing for quick wins when understanding how the system functions.

Why JSON schema exists

When I first started out as a web developer in 2010, JavaScript use was still relatively small, used mostly for adding interactivity to elements or building more complex interfaces.

If you were dealing with external data sources like APIs you’d mostly be communicating with them as part of the back-end code, most likely via XML (and if you were unfortunate…

--

--

Colin Wren
The Startup

Currently building reciprocal.dev. Interested in building shared understanding, Automated Testing, Dev practises, Metal, Chiptune. All views my own.