JSON-LD and a Walk

Reading Time: 2 minutes
A conventional tech blogger would usually just write about JSON-LD and completely ignore the fact that they went on a walk. I like to combine the two. JSON-LD, short for JSON Linked Document is an agreement for certain data fields to be used for specific purposes. The idea is to standardise terms within a database to make the sharing of data easier.

When you work with databases and data it is important to define what the schema will be. A schema is like a template but with data fields. It is an agreement, or requirement to have specific data about a product, asset or other.

For example for a book you will have

Title

Author

Date published

ISBN

Publisher

Location Published

Price

Description

Synopsis

Language and more.

A schema ensures that all fields are entered. This ensures that useful information is either A)Not forgotten and B)All entries look the same on a webpage. If you think I’m verbose look at Schema.org’s entry for book fields. By following these instructions data is interchangeable between all websites, without the need to re-map data

JSON-LD is a lightweight Linked Data format. It is easy for humans to read and write. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases such as Apache CouchDB and MongoDB.
JSON-LD org: https://json-ld.org/

A Use Case

When I worked as a media asset manager we had to think about how to map data between a media asset management tool and a CMS. This required finding a way to map the data so that it would be compatible between databases. If done well databases can feed themselves, without the need for humans to do the tedious work of data entry, especially when thousands of data entries with dozens of fields each are involved.

On a smaller scale it means that we can create a webpage, setup a schema, add it to the top of the page, and search engines will know what the page contains, more efficiently. On WordPress it works automatically once you add the right plugin.

Experiment with JSON-LD

If you’d like to experiment with JSON-LD then you can try this site. It provides a quick way to enter data, and see the resultant JSON-LD data, which you can then paste in a web page.

The Walk

Today I saw quite a few contrails in the sky as I walked between villages. The weather is windy, but as usual the sun is out. I am going through my usual alternate route these days. It takes me through houses, rather than along the road. It is always worth updating routes, although I think that the new route might be shorter. I see that the route I took today is around 3 kilometres shorter than another. I cheated myself of an extra half hour of walking. It gives me more time to do other things.