SlideShare a Scribd company logo
1 of 27
Download to read offline
JSON-LD
                       Linked Data for Web Apps



                           Gregg Kellogg
                         gregg@greggkellogg.net
                               @gkellogg
Tuesday, July 10, 12
Introducing JSON-LD
                                                                        @graph
                       @context
                                               @id

                        JSON-based syntax to express linked data

                                                                      @language
                            @value

                                                        @list
            @type                    @set


Tuesday, July 10, 12

JSON-LD brings a standard representation for expressing entity-value relationships using a
few standard keywords and a consistent organizational structure for JSON Objects.
ā€¢Objects represent entities, with keys acting as properties.
   ā€¢Properties always expand to full IRIs.
ā€¢Arrays express a set of values associated with a property, unordered by default.
   ā€¢Order expressed in @context or as an expanded value representation.
ā€¢Values are Object, string or native, with standard XSD representations for native types.
   ā€¢Expanded form allows for more datatype and language variations.
Self-describing Messages
          ā€¢      Give objects types              {
                                                     "@context": {
                 (@type)                               "schema":     "http://schema.org/",
                                                       "Person":     "schema:Person",
                                                       "knows":       {"@id": "schema:knows", "@type": "@id"},
                                                       "name":       "schema:name",
                                                       "image":      {"@id": "schema:image", "@type": "@id"},
                                                       "url":        {"@id": "schema:url", "@type": "@id"}
                                                     }
                                                 }

                                                 {
                                                     "@context": "http://example.com/context.jsonld",
                                                     "@type": "Person",
                                                     "image": "http://localhost:9393/examples/schema.org/janedoe.jpg",
                                                     "knows": [
                                                        "http://www.xyz.edu/students/alicejones.html",
                                                        "http://www.xyz.edu/students/bobsmith.html"
                                                     ],
                                                     "name": "Jane Doe",
                                                     "url": "http://www.janedoe.com"
                                                 }




Tuesday, July 10, 12

The @type key gives an object with one or more types, described with an IRI.
The @context provides a way to express IRIs as simple terms, and allows values to be typed.
Self-describing Messages
          ā€¢      Give objects types     {
                                            "@context": {
                 (@type)                      "schema":     "http://schema.org/",
                                              "Person":     "schema:Person",

          ā€¢
                                              "knows":       {"@id": "schema:knows", "@type": "@id"},
                 Associate properties         "name":       "schema:name",
                                              "image":      {"@id": "schema:image", "@type": "@id"},
                 with IRIs                    "url":        {"@id": "schema:url", "@type": "@id"}
                                            }
                                        }

                                        {
                                            "@context": "http://example.com/context.jsonld",
                                            "@type": "Person",
                                            "image": "http://localhost:9393/examples/schema.org/janedoe.jpg",
                                            "knows": [
                                               "http://www.xyz.edu/students/alicejones.html",
                                               "http://www.xyz.edu/students/bobsmith.html"
                                            ],
                                            "name": "Jane Doe",
                                            "url": "http://www.janedoe.com"
                                        }




Tuesday, July 10, 12
Self-describing Messages
          ā€¢      Give objects types      {
                                             "@context": {
                 (@type)                       "schema":     "http://schema.org/",
                                               "Person":     "schema:Person",

          ā€¢
                                               "knows":       {"@id": "schema:knows", "@type": "@id"},
                 Associate properties          "name":       "schema:name",
                                               "image":      {"@id": "schema:image", "@type": "@id"},
                 with IRIs                     "url":        {"@id": "schema:url", "@type": "@id"}
                                             }


          ā€¢
                                         }
                 Use terms deļ¬ned in a
                 referenced context      {
                                             "@context": "http://example.com/context.jsonld",
                                             "@type": "Person",
                                             "image": "http://localhost:9393/examples/schema.org/janedoe.jpg",
                                             "knows": [
                                                "http://www.xyz.edu/students/alicejones.html",
                                                "http://www.xyz.edu/students/bobsmith.html"
                                             ],
                                             "name": "Jane Doe",
                                             "url": "http://www.janedoe.com"
                                         }




Tuesday, July 10, 12
Self-describing Messages
          ā€¢      Give objects types       {
                                              "@context": {
                 (@type)                        "schema":     "http://schema.org/",
                                                "Person":     "schema:Person",

          ā€¢
                                                "knows":       {"@id": "schema:knows", "@type": "@id"},
                 Associate properties           "name":       "schema:name",
                                                "image":      {"@id": "schema:image", "@type": "@id"},
                 with IRIs                      "url":        {"@id": "schema:url", "@type": "@id"}
                                              }


          ā€¢
                                          }
                 Use terms deļ¬ned in a
                 referenced context       {
                                              "@context": "http://example.com/context.jsonld",
                                              "@type": "Person",

          ā€¢      Specify property types
                                              "image": "http://localhost:9393/examples/schema.org/janedoe.jpg",
                                              "knows": [
                                                 "http://www.xyz.edu/students/alicejones.html",
                 in context                      "http://www.xyz.edu/students/bobsmith.html"
                                              ],
                                              "name": "Jane Doe",
                                              "url": "http://www.janedoe.com"
                                          }




Tuesday, July 10, 12
RDF Mapping
          {
              "@context": {
                "schema":     "http://schema.org/",
                "schema:knows": {"@type": "@id"},
                "schema:image": {"@type": "@id"},
                "schema:url":      {"@type": "@id"}
              }
          }


          {                                                                 @preļ¬x schema: <http://schema.org/> .
              "@context": "http://example.com/context.jsonld",              [ a schema:Person;
              "@type": "schema:Person",                                       schema:image
              "schema:image":                                                  <http://localhost:9393/examples/schema.org/janedoe.jpg >;
                 "http://localhost:9393/examples/schema.org/janedoe.jpg",     schema:knows
              "schema:knows": [                                                <http://www.xyz.edu/students/alicejones.html>,
                 "http://www.xyz.edu/students/alicejones.html",                <http://www.xyz.edu/students/bobsmith.html>;
                 "http://www.xyz.edu/students/bobsmith.html"                  schema:name ā€œJane Doeā€;
              ],                                                              schema:url <http://www.janedoe.com>
              "schema:name": "Jane Doe",                                    ].
              "schema:url": "http://www.janedoe.com"
          }




Tuesday, July 10, 12
History

                       ā€¢   2010 ā€“ Started as a way to project from the RDFa API

                           ā€¢   Developers want solutions to work within HTML
                               applications

                           ā€¢   Desire for JSON-idiomatic way of representing RDF
                               (Linked Data)

                           ā€¢   Adapt existing JSON APIs to Linked Data




Tuesday, July 10, 12
History

                       ā€¢ 2011 ā€“ W3C Community Group launched
                        ā€¢ Broad Participation
                        ā€¢ Separation of Syntax from API
                        ā€¢ Proposed to W3C RDF 1.1 Working
                          Group



Tuesday, July 10, 12
History
                       ā€¢ 2012 ā€“ RDF WG abandons other JSON
                         serialization efforts (RDF/JSON)
                        ā€¢ JSON-LD accepted as ofļ¬cial work item
                        ā€¢ Community Group drafts ļ¬nal report
                        ā€¢ RDF WG to publish JSON-LD (Syntax
                           and API) as FPWD


Tuesday, July 10, 12
Language Principles



Tuesday, July 10, 12
ā€¢ Make full use of JSON syntactic
                                         {
                                             "@context": "http://json-ld.org/contexts/person",
       representations                       "@id": "http://greggkellogg.net/foaf#me",
                                             "@type": "Person",
       ā€¢ Object deļ¬nes a subject             "name": "Gregg Kellogg",
                                             "knows": "http://www.markus-lanthaler.com/"
                deļ¬nition                }




Tuesday, July 10, 12
ā€¢ Make full use of JSON syntactic
                                         {
                                             "@context": "http://json-ld.org/contexts/person",
       representations                       "@id": "http://greggkellogg.net/foaf#me",
                                             "@type": "Person",
       ā€¢ Object deļ¬nes a subject             "name": "Gregg Kellogg",
                                             "knows": "http://www.markus-lanthaler.com/"
                deļ¬nition                }

         ā€¢      Also used for subject
                reference and value      { "@id": "http://greggkellogg.net/foaf#me" }
                representations




Tuesday, July 10, 12
ā€¢ Make full use of JSON syntactic
                                               {
                                                   "@context": "http://json-ld.org/contexts/person",
       representations                             "@id": "http://greggkellogg.net/foaf#me",
                                                   "@type": "Person",
       ā€¢ Object deļ¬nes a subject                   "name": "Gregg Kellogg",
                                                   "knows": "http://www.markus-lanthaler.com/"
                deļ¬nition                      }

         ā€¢      Also used for subject
                reference and value            { "@id": "http://greggkellogg.net/foaf#me" }
                representations
                                               {
                                                   "@type": "Recipe",
                                                   "name": "Mom's World Famous Banana Bread",
                                                   "ingredients": [
     ā€¢ Arrays describe sets of unordered
       values
                                                      "3 or 4 ripe bananas, smashed",
                                                      "1 egg",
                                                      "3/4 cup of sugar"
                                                   ],
         ā€¢      Single values can skip array       "nutrition": [{
                                                      "@type": ["NutritionInformation"],
                                                      "calories": ["240 calories"],
                                                      "fatContent": ["9 grams fat"]
                                                   }]
                                               }
Tuesday, July 10, 12
ā€¢      Deļ¬ne terms to use short               {
                                                           "@id": "http://greggkellogg.net/foaf#me",
                property names                             "@type": "http://schema.org/Person",
                                                           "http://schema.org/name": "Gregg Kellogg",
               ā€¢       Convenient for JavaScript ā€œ.ā€       "http://schema.org/knows": {
                                                             "@id": "http://www.markus-lanthaler.com/"
                       notation                            }
                                                       }
                                                       {
                                                           "@context": {
                                                              "Person": "http://schema.org/Person",
                                                              "name": "http://schema.org/name",
                                                              "knowsā€: "http://schema.org/knows"
                                                           },
                                                           "@id": "http://greggkellogg.net/foaf#me",
                                                           "@type": "Person",
                                                           "name": "Gregg Kellogg",
                                                           "knows": {"@id": "http://www.markus-lanthaler.com/"}
                                                       }




Tuesday, July 10, 12
ā€¢      Deļ¬ne terms to use short               {
                                                           "@id": "http://greggkellogg.net/foaf#me",
                property names                             "@type": "http://schema.org/Person",
                                                           "http://schema.org/name": "Gregg Kellogg",
               ā€¢       Convenient for JavaScript ā€œ.ā€       "http://schema.org/knows": {
                                                             "@id": "http://www.markus-lanthaler.com/"
                       notation                            }
                                                       }
         ā€¢      Add @type coercions to
                use simple string value.
                                                       {
                                                           "@context": {
                                                              "schema": "http://schema.org/",
                                                              "Person": "schema:Person",
                                                              "name": "schema:name",
                                                              "knowsā€: {
                                                                "@id": "schema:knows",
                                                                "@type": "@id"
                                                           },
                                                           "@id": "http://greggkellogg.net/foaf#me",
                                                           "@type": "Person",
                                                           "name": "Gregg Kellogg",
                                                           "knows": "http://www.markus-lanthaler.com/"
                                                       }




Tuesday, July 10, 12
ā€¢      Deļ¬ne terms to use short               {
                                                           "@id": "http://greggkellogg.net/foaf#me",
                property names                             "@type": "http://schema.org/Person",
                                                           "http://schema.org/name": "Gregg Kellogg",
               ā€¢       Convenient for JavaScript ā€œ.ā€       "http://schema.org/knows": {
                                                             "@id": "http://www.markus-lanthaler.com/"
                       notation                            }
                                                       }
         ā€¢      Add @type coercions to
                use simple string value.
                                                       {
                                                           "@context": {
                                                             "schema": "http://schema.org/",
                                                             "Person": "schema:Person",
         ā€¢      Use external @context.                       "name": "schema:name",
                                                             "knowsā€: {
                                                               "@id": "schema:knows",
                                                               "@type": "@id"
                                                           }
                                                       }
                                                       {
                                                           "@context": "http://json-ld.org/contexts/person",
                                                           "@id": "http://greggkellogg.net/foaf#me",
                                                           "@type": "Person",
                                                           "name": "Gregg Kellogg",
                                                           "knows": "http://www.markus-lanthaler.com/"
                                                       }


Tuesday, July 10, 12
ā€¢
                                           {
                Deļ¬ne referenced subject       "@context": "http://json-ld.org/contexts/person",
                deļ¬nition with chaining        "@id": "http://greggkellogg.net/foaf#me",
                                               "@type": "Person",
                                               "name": "Gregg Kellogg",
                                               "knows": {
                                                 "@id": "http://www.markus-lanthaler.com/",
                                                 "@type": "Person",
                                                 "name": "Markus Lanthaler",
                                                 "knows" "http://greggkellogg.net/foaf#me"
                                               }
                                           }




Tuesday, July 10, 12

Subject reference identiļ¬es an object with @id in the same document, or references an
external document (Linked Data).
ā€¢
                                           {
                Deļ¬ne referenced subject       "@context": "http://json-ld.org/contexts/person",
                deļ¬nition with chaining        "@id": "http://greggkellogg.net/foaf#me",
                                               "@type": "Person",
                                               "name": "Gregg Kellogg",
                                               "knows": {
                                                 "@id": "http://www.markus-lanthaler.com/",
                                                 "@type": "Person",
                                                 "name": "Markus Lanthaler",
                                                 "knows" "http://greggkellogg.net/foaf#me"
                                               }
                                           }
                                           {
                                               "@context": "http://json-ld.org/contexts/person",
                                               "@id": "http://greggkellogg.net/foaf#me",
         ā€¢      Add @language to values.       "@type": "Person",
                                               "name": "Gregg Kellogg",
                                               "honoriļ¬cSufļ¬x": {"@value": "M.S.", "@language": "en"},
                                               "knows": {
                                                 "@id": "http://www.markus-lanthaler.com/",
                                                 "@type": "Person",
                                                 "name": "Markus Lanthaler",
                                                 "honoriļ¬cSufļ¬x": {"@value": "Dipl.Ing.", "@language": "de"},
                                                 "knows" "http://greggkellogg.net/foaf#me"
                                               }
                                           }

Tuesday, July 10, 12

Subject reference identiļ¬es an object with @id in the same document, or references an
external document (Linked Data).
ā€¢      Add @type to values.        {
                                                "@context": "http://json-ld.org/contexts/person",
                                                "@id": "http://greggkellogg.net/foaf#me",
         ā€¢      Link to externally deļ¬ned       "@type": "Person",
                                                "name": "Gregg Kellogg",
                resources.                      "birthDate": {"@value": "1957-02-27", "@type": "xsd:date"},
                                                "honoriļ¬cSufļ¬x": {"@value": "M.S.", "@language": "en"},
                                                "knows": "http://www.markus-lanthaler.com/"
                                            }




Tuesday, July 10, 12
ā€¢      Add property @type and    {
                                               "@context": {
                 @language deļ¬nitions to          "schema": "http://schema.org/",
                 context                          "Person": "schema:Person",
                                                  "name": "schema:name",
                                                  "birthDateā€: {
                                                     "@id": "schema: birthDate","@type": "xsd:date"
                                                  },
                                                  "honoriļ¬cSufļ¬xā€: {
                                                     "@id": "schema:honoriļ¬cSufļ¬x","@language": "en"
                                                  },
                                                  "knowsā€: {"@id": "schema:knows","@type": "@id"}
                                               },
                                               "@id": "http://greggkellogg.net/foaf#me",
                                               "@type": "Person",
                                               "name": "Gregg Kellogg",
                                               "birthDate": "1957-02-27",
                                               "honoriļ¬cSufļ¬x": "M.S.",
                                               "knows": "http://www.markus-lanthaler.com/"
                                           }




Tuesday, July 10, 12
ā€¢ More features deļ¬ned in the syntax
                            speciļ¬cation*:

                          ā€¢ @set, @list, Compact IRIs, Unlabeled
                                 Nodes

                          ā€¢ Embedded @context deļ¬nitions
                          ā€¢ Named Graphs
                   * http://json-ld.org/spec/latest/json-ld-syntax


Tuesday, July 10, 12
Retroļ¬t existing APIs
                       GET /foaf.json HTTP/1.1
                       Host: greggkellogg.net
                       Accept: application/json,*/*;q=0.1

                       ====================================

                       HTTP/1.0 200 OK
                       ...
                       Content-Type: application/json
                       Link: <http://json-ld.org/contexts/person>; rel="describedby"; type="application/ld+json"

                       {
                           "name": "Gregg Kellogg",
                           "homepage": "http://greggkellogg.net/",
                           "depiction": "http://twitter.com/account/proļ¬le_image/gkellogg"
                       }




Tuesday, July 10, 12

Normal JSON can be made JSON-LD by adding an external context through an HTTP link
relation.
The ā€œLDā€ in JSON-LD
          ā€¢      IRIs are ļ¬rst-class                http://greggkellogg.net/foaf

                 citizens              {
                                           "@context": "http://json-ld.org/contexts/person",
                                           "@id": "http://greggkellogg.net/foaf#me",
                                           "@type": "Person",
                                           "name": "Gregg Kellogg",
                                           "knows": "http://www.markus-lanthaler.com/"
                                       }

                                                    http://www.markus-lanthaler.com

                                       {
                                           "@context": "http://json-ld.org/contexts/person",
                                           "@id": "http://www.markus-lanthaler.com/",
                                           "@type": "Person",
                                           "name": "Markus Lanthaler",
                                           "knows" "http://greggkellogg.net/foaf#me"
                                       }




Tuesday, July 10, 12
The ā€œLDā€ in JSON-LD
            ā€¢    IRIs are ļ¬rst-class                                         http://greggkellogg.net/foaf

                 citizens                                       {
                                                                    "@context": "http://json-ld.org/contexts/person",

            ā€¢    Object deļ¬nitions may
                                                                    "@id": "http://greggkellogg.net/foaf#me",
                                                                    "@type": "Person",
                 be referenced or                                   "name": "Gregg Kellogg",
                                                                    "knows": "http://www.markus-lanthaler.com/"
                 embedded                                       }

                                                                             http://www.markus-lanthaler.com

                                                                {
        {                                                           "@context": "http://json-ld.org/contexts/person",
            "@context": "http://json-ld.org/contexts/person",       "@id": "http://www.markus-lanthaler.com/",
            "@id": "http://greggkellogg.net/foaf#me",               "@type": "Person",
            "@type": "Person",                                      "name": "Markus Lanthaler",
            "name": "Gregg Kellogg",                                "knows" "http://greggkellogg.net/foaf#me"
            "knows": {                                          }
              "@id": "http://www.markus-lanthaler.com/",
              "@type": "Person",
              "name": "Markus Lanthaler",
              "knows" "http://greggkellogg.net/foaf#me"
            }
        }


Tuesday, July 10, 12
JSON-LD API
                       ā€¢ compact ā€“ use minimal representation
                         using a supplied @context
                       ā€¢ expand ā€“ expand to full form, removing
                         embedded @context deļ¬nitions
                       ā€¢ frame ā€“ query for JSON-LD
                       ā€¢ fromRDF/toRDF

Tuesday, July 10, 12
More Information

                       json-ld.org         JavaScript
                                              Ruby
                              w3c              Python
                                                 PHP
                                                    Java
                Gregg Kellogg                          C++
                gregg@greggkellogg.net
                http://greggkellogg.net/
                @gkellogg



Tuesday, July 10, 12

More Related Content

What's hot

JSON-LD update DC 2017
JSON-LD update DC 2017JSON-LD update DC 2017
JSON-LD update DC 2017Gregg Kellogg
Ā 
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat SemaphobiaA Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat SemaphobiaMarkus Lanthaler
Ā 
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Markus Lanthaler
Ā 
03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data Out03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data OutOpenThink Labs
Ā 
01 ElasticSearch : Getting Started
01 ElasticSearch : Getting Started01 ElasticSearch : Getting Started
01 ElasticSearch : Getting StartedOpenThink Labs
Ā 
Advanced Json
Advanced JsonAdvanced Json
Advanced Jsonguestfd7d7c
Ā 
Hypermedia In Practice - FamilySearch Developers Conference 2014
Hypermedia In Practice - FamilySearch Developers Conference 2014Hypermedia In Practice - FamilySearch Developers Conference 2014
Hypermedia In Practice - FamilySearch Developers Conference 2014Ryan Heaton
Ā 
Creating Operational Redundancy for Effective Web Data Mining
Creating Operational Redundancy for Effective Web Data MiningCreating Operational Redundancy for Effective Web Data Mining
Creating Operational Redundancy for Effective Web Data MiningJonathan LeBlanc
Ā 
Securing and Personalizing Commerce Using Identity Data Mining
Securing and Personalizing Commerce Using Identity Data MiningSecuring and Personalizing Commerce Using Identity Data Mining
Securing and Personalizing Commerce Using Identity Data MiningJonathan LeBlanc
Ā 
Semantic Web in the browser. From a blind Web to
Semantic Web in the browser. From a blind Web toSemantic Web in the browser. From a blind Web to
Semantic Web in the browser. From a blind Web toSabin Buraga
Ā 
YQL:: Select * from Internet
YQL:: Select * from InternetYQL:: Select * from Internet
YQL:: Select * from Internetdrgath
Ā 
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyHarnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyAndrƩ Ricardo Barreto de Oliveira
Ā 
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...AndrƩ Ricardo Barreto de Oliveira
Ā 
Searching the Web of Data (Tutorial)
Searching the Web of Data (Tutorial)Searching the Web of Data (Tutorial)
Searching the Web of Data (Tutorial)Gerard de Melo
Ā 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to ElasticsearchLuiz Messias
Ā 
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020Rob Ousbey
Ā 
"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul
"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul
"RDFa - what, why and how?" by Mike Hewett and Shamod LacoulShamod Lacoul
Ā 
JSON Referencing and Schema
JSON Referencing and SchemaJSON Referencing and Schema
JSON Referencing and Schemakriszyp
Ā 
Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Izzi Smith
Ā 

What's hot (20)

JSON-LD update DC 2017
JSON-LD update DC 2017JSON-LD update DC 2017
JSON-LD update DC 2017
Ā 
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat SemaphobiaA Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
Ā 
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Ā 
03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data Out03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data Out
Ā 
01 ElasticSearch : Getting Started
01 ElasticSearch : Getting Started01 ElasticSearch : Getting Started
01 ElasticSearch : Getting Started
Ā 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
Ā 
Hypermedia In Practice - FamilySearch Developers Conference 2014
Hypermedia In Practice - FamilySearch Developers Conference 2014Hypermedia In Practice - FamilySearch Developers Conference 2014
Hypermedia In Practice - FamilySearch Developers Conference 2014
Ā 
Creating Operational Redundancy for Effective Web Data Mining
Creating Operational Redundancy for Effective Web Data MiningCreating Operational Redundancy for Effective Web Data Mining
Creating Operational Redundancy for Effective Web Data Mining
Ā 
Securing and Personalizing Commerce Using Identity Data Mining
Securing and Personalizing Commerce Using Identity Data MiningSecuring and Personalizing Commerce Using Identity Data Mining
Securing and Personalizing Commerce Using Identity Data Mining
Ā 
Semantic Web in the browser. From a blind Web to
Semantic Web in the browser. From a blind Web toSemantic Web in the browser. From a blind Web to
Semantic Web in the browser. From a blind Web to
Ā 
YQL:: Select * from Internet
YQL:: Select * from InternetYQL:: Select * from Internet
YQL:: Select * from Internet
Ā 
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, GermanyHarnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Ā 
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Liferay Search: Best Practices to Dramatically Improve Relevance - Liferay Sy...
Ā 
Searching the Web of Data (Tutorial)
Searching the Web of Data (Tutorial)Searching the Web of Data (Tutorial)
Searching the Web of Data (Tutorial)
Ā 
Awesome Tools 2017
Awesome Tools 2017Awesome Tools 2017
Awesome Tools 2017
Ā 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Ā 
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
A Novel Approach to Scraping Websites - Rob Ousbey, MozCon 2020
Ā 
"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul
"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul
"RDFa - what, why and how?" by Mike Hewett and Shamod Lacoul
Ā 
JSON Referencing and Schema
JSON Referencing and SchemaJSON Referencing and Schema
JSON Referencing and Schema
Ā 
Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018Winning with Structured Data and Schema.org - OMLIVE 2018
Winning with Structured Data and Schema.org - OMLIVE 2018
Ā 

Viewers also liked

Viewers also liked (6)

Linked data-tooling-xml
Linked data-tooling-xmlLinked data-tooling-xml
Linked data-tooling-xml
Ā 
Json
JsonJson
Json
Ā 
JSON
JSONJSON
JSON
Ā 
Json tutorial
Json tutorialJson tutorial
Json tutorial
Ā 
Json
JsonJson
Json
Ā 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
Ā 

Similar to JSON-LD: Linked Data for Web Apps

LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat
Ā 
JSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataJSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataSante J. Achille
Ā 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonStormpath
Ā 
JSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFEJSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFEHiroyuki Anai
Ā 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2kriszyp
Ā 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFdonaldlsmithjr
Ā 
Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionJoEllen Carter
Ā 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDBShuai Liu
Ā 
IPTC News in JSON AGM 2013
IPTC News in JSON AGM 2013IPTC News in JSON AGM 2013
IPTC News in JSON AGM 2013Stuart Myles
Ā 
Bioschemas: Using Schema.org for describing scientific information
Bioschemas: Using Schema.org for describing scientific information Bioschemas: Using Schema.org for describing scientific information
Bioschemas: Using Schema.org for describing scientific information Bioschemas
Ā 
Modeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesModeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesRyan CrawCour
Ā 
Schema Design
Schema DesignSchema Design
Schema DesignMongoDB
Ā 
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE
Ā 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPressTaylor Lovett
Ā 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQLLuca Garulli
Ā 
Schema design mongo_boston
Schema design mongo_bostonSchema design mongo_boston
Schema design mongo_bostonMongoDB
Ā 
Sakai customization talk
Sakai customization talkSakai customization talk
Sakai customization talkcroby
Ā 

Similar to JSON-LD: Linked Data for Web Apps (20)

LF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON SchemaLF_APIStrat17_Embracing JSON Schema
LF_APIStrat17_Embracing JSON Schema
Ā 
JSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataJSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured data
Ā 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
Ā 
JSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFEJSON Schema in Web Frontend #insideFE
JSON Schema in Web Frontend #insideFE
Ā 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
Ā 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
Ā 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDF
Ā 
Drupal Mobile
Drupal MobileDrupal Mobile
Drupal Mobile
Ā 
Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collection
Ā 
Mongo db
Mongo dbMongo db
Mongo db
Ā 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
Ā 
IPTC News in JSON AGM 2013
IPTC News in JSON AGM 2013IPTC News in JSON AGM 2013
IPTC News in JSON AGM 2013
Ā 
Bioschemas: Using Schema.org for describing scientific information
Bioschemas: Using Schema.org for describing scientific information Bioschemas: Using Schema.org for describing scientific information
Bioschemas: Using Schema.org for describing scientific information
Ā 
Modeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesModeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databases
Ā 
Schema Design
Schema DesignSchema Design
Schema Design
Ā 
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LD
Ā 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
Ā 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQL
Ā 
Schema design mongo_boston
Schema design mongo_bostonSchema design mongo_boston
Schema design mongo_boston
Ā 
Sakai customization talk
Sakai customization talkSakai customization talk
Sakai customization talk
Ā 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
Ā 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜RTylerCroy
Ā 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
Ā 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
Ā 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
Ā 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
Ā 
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
Ā 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
Ā 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
Ā 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Ā 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Ā 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Ā 
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 āœ“Call Girls In Kalyan ( Mumbai ) secure service
Ā 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Ā 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Ā 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Ā 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 

JSON-LD: Linked Data for Web Apps

  • 1. JSON-LD Linked Data for Web Apps Gregg Kellogg gregg@greggkellogg.net @gkellogg Tuesday, July 10, 12
  • 2. Introducing JSON-LD @graph @context @id JSON-based syntax to express linked data @language @value @list @type @set Tuesday, July 10, 12 JSON-LD brings a standard representation for expressing entity-value relationships using a few standard keywords and a consistent organizational structure for JSON Objects. ā€¢Objects represent entities, with keys acting as properties. ā€¢Properties always expand to full IRIs. ā€¢Arrays express a set of values associated with a property, unordered by default. ā€¢Order expressed in @context or as an expanded value representation. ā€¢Values are Object, string or native, with standard XSD representations for native types. ā€¢Expanded form allows for more datatype and language variations.
  • 3. Self-describing Messages ā€¢ Give objects types { "@context": { (@type) "schema": "http://schema.org/", "Person": "schema:Person", "knows": {"@id": "schema:knows", "@type": "@id"}, "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, "url": {"@id": "schema:url", "@type": "@id"} } } { "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "knows": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com" } Tuesday, July 10, 12 The @type key gives an object with one or more types, described with an IRI. The @context provides a way to express IRIs as simple terms, and allows values to be typed.
  • 4. Self-describing Messages ā€¢ Give objects types { "@context": { (@type) "schema": "http://schema.org/", "Person": "schema:Person", ā€¢ "knows": {"@id": "schema:knows", "@type": "@id"}, Associate properties "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, with IRIs "url": {"@id": "schema:url", "@type": "@id"} } } { "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "knows": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com" } Tuesday, July 10, 12
  • 5. Self-describing Messages ā€¢ Give objects types { "@context": { (@type) "schema": "http://schema.org/", "Person": "schema:Person", ā€¢ "knows": {"@id": "schema:knows", "@type": "@id"}, Associate properties "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, with IRIs "url": {"@id": "schema:url", "@type": "@id"} } ā€¢ } Use terms deļ¬ned in a referenced context { "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "knows": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com" } Tuesday, July 10, 12
  • 6. Self-describing Messages ā€¢ Give objects types { "@context": { (@type) "schema": "http://schema.org/", "Person": "schema:Person", ā€¢ "knows": {"@id": "schema:knows", "@type": "@id"}, Associate properties "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, with IRIs "url": {"@id": "schema:url", "@type": "@id"} } ā€¢ } Use terms deļ¬ned in a referenced context { "@context": "http://example.com/context.jsonld", "@type": "Person", ā€¢ Specify property types "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "knows": [ "http://www.xyz.edu/students/alicejones.html", in context "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com" } Tuesday, July 10, 12
  • 7. RDF Mapping { "@context": { "schema": "http://schema.org/", "schema:knows": {"@type": "@id"}, "schema:image": {"@type": "@id"}, "schema:url": {"@type": "@id"} } } { @preļ¬x schema: <http://schema.org/> . "@context": "http://example.com/context.jsonld", [ a schema:Person; "@type": "schema:Person", schema:image "schema:image": <http://localhost:9393/examples/schema.org/janedoe.jpg >; "http://localhost:9393/examples/schema.org/janedoe.jpg", schema:knows "schema:knows": [ <http://www.xyz.edu/students/alicejones.html>, "http://www.xyz.edu/students/alicejones.html", <http://www.xyz.edu/students/bobsmith.html>; "http://www.xyz.edu/students/bobsmith.html" schema:name ā€œJane Doeā€; ], schema:url <http://www.janedoe.com> "schema:name": "Jane Doe", ]. "schema:url": "http://www.janedoe.com" } Tuesday, July 10, 12
  • 8. History ā€¢ 2010 ā€“ Started as a way to project from the RDFa API ā€¢ Developers want solutions to work within HTML applications ā€¢ Desire for JSON-idiomatic way of representing RDF (Linked Data) ā€¢ Adapt existing JSON APIs to Linked Data Tuesday, July 10, 12
  • 9. History ā€¢ 2011 ā€“ W3C Community Group launched ā€¢ Broad Participation ā€¢ Separation of Syntax from API ā€¢ Proposed to W3C RDF 1.1 Working Group Tuesday, July 10, 12
  • 10. History ā€¢ 2012 ā€“ RDF WG abandons other JSON serialization efforts (RDF/JSON) ā€¢ JSON-LD accepted as ofļ¬cial work item ā€¢ Community Group drafts ļ¬nal report ā€¢ RDF WG to publish JSON-LD (Syntax and API) as FPWD Tuesday, July 10, 12
  • 12. ā€¢ Make full use of JSON syntactic { "@context": "http://json-ld.org/contexts/person", representations "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", ā€¢ Object deļ¬nes a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" deļ¬nition } Tuesday, July 10, 12
  • 13. ā€¢ Make full use of JSON syntactic { "@context": "http://json-ld.org/contexts/person", representations "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", ā€¢ Object deļ¬nes a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" deļ¬nition } ā€¢ Also used for subject reference and value { "@id": "http://greggkellogg.net/foaf#me" } representations Tuesday, July 10, 12
  • 14. ā€¢ Make full use of JSON syntactic { "@context": "http://json-ld.org/contexts/person", representations "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", ā€¢ Object deļ¬nes a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" deļ¬nition } ā€¢ Also used for subject reference and value { "@id": "http://greggkellogg.net/foaf#me" } representations { "@type": "Recipe", "name": "Mom's World Famous Banana Bread", "ingredients": [ ā€¢ Arrays describe sets of unordered values "3 or 4 ripe bananas, smashed", "1 egg", "3/4 cup of sugar" ], ā€¢ Single values can skip array "nutrition": [{ "@type": ["NutritionInformation"], "calories": ["240 calories"], "fatContent": ["9 grams fat"] }] } Tuesday, July 10, 12
  • 15. ā€¢ Deļ¬ne terms to use short { "@id": "http://greggkellogg.net/foaf#me", property names "@type": "http://schema.org/Person", "http://schema.org/name": "Gregg Kellogg", ā€¢ Convenient for JavaScript ā€œ.ā€ "http://schema.org/knows": { "@id": "http://www.markus-lanthaler.com/" notation } } { "@context": { "Person": "http://schema.org/Person", "name": "http://schema.org/name", "knowsā€: "http://schema.org/knows" }, "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": {"@id": "http://www.markus-lanthaler.com/"} } Tuesday, July 10, 12
  • 16. ā€¢ Deļ¬ne terms to use short { "@id": "http://greggkellogg.net/foaf#me", property names "@type": "http://schema.org/Person", "http://schema.org/name": "Gregg Kellogg", ā€¢ Convenient for JavaScript ā€œ.ā€ "http://schema.org/knows": { "@id": "http://www.markus-lanthaler.com/" notation } } ā€¢ Add @type coercions to use simple string value. { "@context": { "schema": "http://schema.org/", "Person": "schema:Person", "name": "schema:name", "knowsā€: { "@id": "schema:knows", "@type": "@id" }, "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 17. ā€¢ Deļ¬ne terms to use short { "@id": "http://greggkellogg.net/foaf#me", property names "@type": "http://schema.org/Person", "http://schema.org/name": "Gregg Kellogg", ā€¢ Convenient for JavaScript ā€œ.ā€ "http://schema.org/knows": { "@id": "http://www.markus-lanthaler.com/" notation } } ā€¢ Add @type coercions to use simple string value. { "@context": { "schema": "http://schema.org/", "Person": "schema:Person", ā€¢ Use external @context. "name": "schema:name", "knowsā€: { "@id": "schema:knows", "@type": "@id" } } { "@context": "http://json-ld.org/contexts/person", "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 18. ā€¢ { Deļ¬ne referenced subject "@context": "http://json-ld.org/contexts/person", deļ¬nition with chaining "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": { "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "knows" "http://greggkellogg.net/foaf#me" } } Tuesday, July 10, 12 Subject reference identiļ¬es an object with @id in the same document, or references an external document (Linked Data).
  • 19. ā€¢ { Deļ¬ne referenced subject "@context": "http://json-ld.org/contexts/person", deļ¬nition with chaining "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": { "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "knows" "http://greggkellogg.net/foaf#me" } } { "@context": "http://json-ld.org/contexts/person", "@id": "http://greggkellogg.net/foaf#me", ā€¢ Add @language to values. "@type": "Person", "name": "Gregg Kellogg", "honoriļ¬cSufļ¬x": {"@value": "M.S.", "@language": "en"}, "knows": { "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "honoriļ¬cSufļ¬x": {"@value": "Dipl.Ing.", "@language": "de"}, "knows" "http://greggkellogg.net/foaf#me" } } Tuesday, July 10, 12 Subject reference identiļ¬es an object with @id in the same document, or references an external document (Linked Data).
  • 20. ā€¢ Add @type to values. { "@context": "http://json-ld.org/contexts/person", "@id": "http://greggkellogg.net/foaf#me", ā€¢ Link to externally deļ¬ned "@type": "Person", "name": "Gregg Kellogg", resources. "birthDate": {"@value": "1957-02-27", "@type": "xsd:date"}, "honoriļ¬cSufļ¬x": {"@value": "M.S.", "@language": "en"}, "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 21. ā€¢ Add property @type and { "@context": { @language deļ¬nitions to "schema": "http://schema.org/", context "Person": "schema:Person", "name": "schema:name", "birthDateā€: { "@id": "schema: birthDate","@type": "xsd:date" }, "honoriļ¬cSufļ¬xā€: { "@id": "schema:honoriļ¬cSufļ¬x","@language": "en" }, "knowsā€: {"@id": "schema:knows","@type": "@id"} }, "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "birthDate": "1957-02-27", "honoriļ¬cSufļ¬x": "M.S.", "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 22. ā€¢ More features deļ¬ned in the syntax speciļ¬cation*: ā€¢ @set, @list, Compact IRIs, Unlabeled Nodes ā€¢ Embedded @context deļ¬nitions ā€¢ Named Graphs * http://json-ld.org/spec/latest/json-ld-syntax Tuesday, July 10, 12
  • 23. Retroļ¬t existing APIs GET /foaf.json HTTP/1.1 Host: greggkellogg.net Accept: application/json,*/*;q=0.1 ==================================== HTTP/1.0 200 OK ... Content-Type: application/json Link: <http://json-ld.org/contexts/person>; rel="describedby"; type="application/ld+json" { "name": "Gregg Kellogg", "homepage": "http://greggkellogg.net/", "depiction": "http://twitter.com/account/proļ¬le_image/gkellogg" } Tuesday, July 10, 12 Normal JSON can be made JSON-LD by adding an external context through an HTTP link relation.
  • 24. The ā€œLDā€ in JSON-LD ā€¢ IRIs are ļ¬rst-class http://greggkellogg.net/foaf citizens { "@context": "http://json-ld.org/contexts/person", "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" } http://www.markus-lanthaler.com { "@context": "http://json-ld.org/contexts/person", "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "knows" "http://greggkellogg.net/foaf#me" } Tuesday, July 10, 12
  • 25. The ā€œLDā€ in JSON-LD ā€¢ IRIs are ļ¬rst-class http://greggkellogg.net/foaf citizens { "@context": "http://json-ld.org/contexts/person", ā€¢ Object deļ¬nitions may "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", be referenced or "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" embedded } http://www.markus-lanthaler.com { { "@context": "http://json-ld.org/contexts/person", "@context": "http://json-ld.org/contexts/person", "@id": "http://www.markus-lanthaler.com/", "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "@type": "Person", "name": "Markus Lanthaler", "name": "Gregg Kellogg", "knows" "http://greggkellogg.net/foaf#me" "knows": { } "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "knows" "http://greggkellogg.net/foaf#me" } } Tuesday, July 10, 12
  • 26. JSON-LD API ā€¢ compact ā€“ use minimal representation using a supplied @context ā€¢ expand ā€“ expand to full form, removing embedded @context deļ¬nitions ā€¢ frame ā€“ query for JSON-LD ā€¢ fromRDF/toRDF Tuesday, July 10, 12
  • 27. More Information json-ld.org JavaScript Ruby w3c Python PHP Java Gregg Kellogg C++ gregg@greggkellogg.net http://greggkellogg.net/ @gkellogg Tuesday, July 10, 12