Shawn Mervin

JSON

The plain-text format every one of my APIs speaks.

Visit json.orgWhere the data lives

What it is

JSON, JavaScript Object Notation, is a lightweight text format for structured data. It has only a few building blocks: objects, arrays, strings, numbers, true, false and null. Douglas Crockford popularized it in the early 2000s, and it is now standardized as ECMA-404 and RFC 8259, so every implementation agrees on what is valid.

It is easy for people to read and for every major language to parse, which made it the default format for web APIs. Configuration files, logs and document databases use it too. Its main limits are the lack of comments and of a built-in date type, which each system has to settle by convention.

How I use it

  • REST and JSON APIs with JWT auth connect the Rental Pilot web app and field app to the API.
  • Lend Pilot's Node and Express API returns JSON to its React front end.
  • Used since the Metal Mountain years alongside Flex, ActionScript 3, PHP and MySQL.

JSON is the right format whenever two systems need to exchange data over HTTP. I use it for every API because the web app, the phone app and the server can all read it without extra libraries, and it is easy to inspect when something goes wrong.

Questions

Can you connect our system to another one?

Usually, yes. Most modern services speak JSON over HTTP, and the integration page shows the services my systems already talk to.

How are your APIs secured?

Rental Pilot and Lend Pilot use JWT authentication on their JSON APIs, with permissions enforced on the server.

Working with JSON?

Tell me what you're building. Start a project or see the whole stack.

Got an operation that's outgrown its spreadsheets?

Tell me what your business does and where it's jamming up. If I'm not the right person for it, I'll say so and point you somewhere better.

What to send, and what happens next