JSON-LD

What is JSON-LD?

JSON-LD is a method of encoding (serializing), storing, and communicating Linked Data using JSON. JSON-LD requires a context to be defined that links elements of the document in a JSON document to concepts in the underlying ontology. The context can be embedded directly in a JSON-LD document or put into a separate linked resource.

Example

{
  "@context": {
    "name": "http://xmlns.com/foaf/0.1/name",
    "homepage": {
      "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage",
      "@type": "@id"
    },
    "Person": "http://xmlns.com/foaf/0.1/Person"
  },
  "@id": "https://me.example.com",
  "@type": "Person",
  "name": "John Smith",
  "homepage": "https://www.example.com/"
}

The example above describes a person, based on the FOAF vocabulary. First, the two JSON properties name and homepage and the type Person are mapped to concepts in the FOAF vocabulary.

By having all data semantically annotated as in the example, a structured data processor can identify that the document contains information about a person and if the processor understands the FOAF vocabulary, it can determine which properties specify the person’s name and homepage.

Linking JSON-LD documents

In the spirit of Linked Data, to be able to externally reference JSON-LD documents (as nodes in the Linked Data graph), it is important that they have an identifier (@id). For your JSON-LD document to be truly linked, other applications need to know its identifier. Dereferencing the identifier should result in a representation of that node on your website.

Cofactor provides a uniform identifier space for you to use. When you describe a particular entity in your JSON-LD document, you can use the associated Cofactor ID of that entity as an @id of the document. When someone else later uses the same Cofactor ID as a property value in their JSON-LD document, the two become semantically linked. When a third party dereferences the identifier, they get a representation of the original document (node).

Use

The JSON-LD encoding is used by Schema.org and Google Knowledge Graph API. It is also commonly used by webmasters for search engine optimization.

Have feedback on this article? Let @g_11fhkb1_61 know.
Need help? Contact us.

Discover Eckher Semantic Web Browser: "http://xmlns.com/foaf/0.1/Person", "http://schema.org/Organization", "http://www.w3.org/2004/02/skos/core#definition", "http://www.wikidata.org/entity/Q1".

Discover English pronunciations: "Nepartak", "Schmigadoon!", "DaniLeigh", "Miesha Tate", "Camila Cabello", "Tradjenta", "Agricola", "Sanofi", "Jeff Bezos", "Coronaviridae", "Tua Tagovailoa", "Craig Federighi", "Stefanos Tsitsipas", "SZA", "Cassie Kozyrkov".

Turn your phone into a compass using Eckher Compass.

Browse word pronunciations online using Eckher Dictionary.

Author, enrich, and query structured data using Eckher Database for RDF.

Create TeX-style mathematical formulas online with Eckher Math Editor.

Create knowledge graphs using Eckher RDF Graph Editor.

Send messages and make P2P calls using Eckher Messenger.

Build event-sourced systems using Eckher Database for Event Sourcing.

View PDB files online using Eckher Mol Viewer.

Listen to your text using Eckher Text to Speech.

View FASTA sequence alignments online with Eckher Sequence Alignment Viewer.

Convert Punycode-encoded internationalized domain names (IDNs) to Unicode and back with Eckher Punycode Converter.

Explore the human genome online with Eckher Genome Browser.

Edit text files online with Eckher Simple Text Editor.

Send test emails with Eckher SMTP Testing Tool.

Разбор слов по составу: "кормушка", "светить", "сбоку", "шиповник", "народ", "впервые", "свежесть", "издалека", "лесной".