ArticleslgStudy

science

JSON-LD

JSON-LD is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand JSON-LD rather than just read about it. In short: JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON and of serializing data similarly to traditional JSON. It is meant to be simple to create by modifying JSON documents.

Key takeaways

  • JSON-LD belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect JSON-LD to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of JSON-LD from memory before moving on to harder problems.

Reference excerpt

JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON and of serializing data similarly to traditional JSON. It is meant to be simple to create by modifying JSON documents. JSON-LD is a World Wide Web Consortium Recommendation initially developed by the JSON for Linking Data Community Group, transferred to the RDF Working Group for review, improvement and standardization, and now maintained by the JSON-LD Working Group.

Design JSON-LD is based on the concept of a "context" that maps JSON object properties to concepts in an ontology using an RDF model. In order to map the JSON-LD syntax to RDF, JSON-LD allows values to be coerced to a specified type or tagged with a language. A context can be embedded directly in a JSON-LD document or put into a separate file and referenced from traditional JSON documents via an HTTP Link header.

Example

The example above describes a person, based on the FOAF (friend of a friend) ontology. First, the two JSON properties name and homepage and the type Person are mapped to concepts in the FOAF vocabulary and the value of the homepage property is specified to be of the type @id. In other words, the homepage id is specified to be an IRI in the context definition. Based on the RDF model, this allows the person described in the document to be unambiguously identified by an IRI. The use of resolvable IRIs allows RDF documents containing more information to be transcluded which enables clients to discover new data by following those links; this principle is known as 'Follow Your Nose'. By having all data semantically annotated as in the example, an RDF processor can identify that the document contains information about a person (@type) and if the processor understands the FOAF vocabulary it can determine which properties specify the person's name and homepage.

Use The encoding is used by Schema.org, Google Knowledge Graph, and used mostly for search engine optimization activities. It has also been used for applications such as biomedical informatics, and representing provenance information. It is also the basis of Activity Streams, a format for "the exchange of information about potential and completed activities", and is used in ActivityPub, the federated social networking protocol. Additionally, it is used in the context of Internet of Things (IoT), where a Thing Description, which is a JSON-LD document, describes the network facing interfaces of IoT devices.

See also Hypertext Application Language

References

External links JSON-LD.org

Worked examples

Example 1 — a first encounter with JSON-LD

Start with the simplest possible case. Write down what JSON-LD claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to JSON-LD before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about JSON-LD ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of JSON-LD

In research
JSON-LD appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses JSON-LD in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
JSON-LD is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data serialization formats, JSON, Markup languages, so understanding it makes those chapters shorter.
In everyday life
Look for JSON-LD outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study JSON-LD in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what JSON-LD means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain JSON-LD out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is JSON-LD in simple terms?

JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON and of serializing data similarly to traditional JSON. It is meant to be simple to create by modifying JSON documents.

Why does JSON-LD matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study JSON-LD?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on JSON-LD.

Tags

  • Data serialization formats
  • JSON
  • Markup languages
  • Resource Description Framework
  • Semantic Web

Keep exploring