Close menu

JSON-LD


Source: http://en.wikipedia.org/wiki/JSON-LD
Updated: 2017-05-29T07:03Z
JSON-LD 1.0 - A JSON-based Serialization for Linked Data
StatusW3C Recommendation
Year started2010
EditorsManu Sporny, Gregg Kellogg, Markus Lanthaler
AuthorsManu Sporny, Dave Longley, Gregg Kellogg, Markus Lanthaler, Niklas Lindström
Base standardsJSON, RDF
DomainSemantic Web, Data Serialization
AbbreviationJSON-LD
WebsiteJSON-LD 1.0
JSON-LD 1.0 Processing Algorithms and API
StatusW3C Recommendation
Year started2010
EditorsMarkus Lanthaler, Gregg Kellogg, Manu Sporny
AuthorsDave Longley, Gregg Kellogg, Markus Lanthaler, Manu Sporny
Base standardsJSON-LD
DomainSemantic Web, API, Algorithm
AbbreviationJSON-LD-API
WebsiteJSON-LD 1.0 API

JSON-LD, or JavaScript Object Notation for Linked Data, is a method of encoding Linked Data using JSON. It was a goal to require as little effort as possible from developers to transform their existing JSON to JSON-LD.[1] This allows data to be serialized in a way that is similar to traditional JSON.[2] It is a World Wide Web Consortium Recommendation. It was initially developed by the JSON for Linking Data Community Group before being transferred to the RDF Working Group[3] for review, improvement, and standardization.[4]

Design

JSON-LD is designed around the concept of a "context" to provide additional mappings from JSON to an RDF model. The context links object properties in a JSON document to concepts in an ontology. In order to map the JSON-LD syntax to RDF, JSON-LD allows values to be coerced to a specified type or to be tagged with a language. A context can be embedded directly in a JSON-LD document or put into a separate file and referenced from different documents (from traditional JSON documents via an HTTP Link header).

Example

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


{  "@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": "http://me.example.com",  "@type": "Person",  "name": "John Smith",  "homepage": "http://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 and the value of the homepage property is specified to be of the type @id, i.e., it 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 simply following those links; this principle is known as Follow Your Nose.[5]

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 Google Knowledge Graph[6] and others.

References

  1. ^ "JSON-LD Syntax 1.0". 2011-12-27. Retrieved 2011-12-30. 
  2. ^ "On Using JSON-LD to Create Evolvable RESTful Services". , M. Lanthaler and C. Gütl in Proceedings of the 3rd International Workshop on RESTful Design (WS-REST 2012) at WWW2012.
  3. ^ RDF Working Group This Working Group ended its activities on 1 July 2014 and is now closed.
  4. ^ JSON-LD 1.0, A JSON-based Serialization for Linked Data, W3C Recommendation 16 January 2013, 2014-01-16 
  5. ^ "Linked Data Patterns, Chapter 5: Follow Your Nose". 2011-12-27. Retrieved 2011-12-30. 
  6. ^ "Method Entities in Search". Google Developers. Retrieved 2016-02-19. 

External links

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.

Also On Wow

    Advertisement

    Trending Now