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.

Sequence Logo is an online tool for creating sequence logos. Paste your multiple sequence alignment and the sequence logo is generated automatically. Use Sequence Logo to easily create vector sequence logo graphs.

Please refer to the Sequence Logo manual for the sequence logo parameters and configuration. Sequence Logo supports multiple color schemes and download formats.

Sequence Logo is sequence logo generator. Sequence logos visualize protein and nucleic acid motifs and patterns identified through multiple sequence alignment.

Te Reo Maps is an online interactive Maori mapping service. All labels in Te Reo Maps are in Maori, making it the first interactive Maori map. Te Reo Maps is the world map, with all countries and territories translated into Maori.

Please refer to the list of countries in Maori for the Maori translations of country names. The list includes all UN members and sovereign territories.