SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
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 defined 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 defined 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"}
              }
          }


          {                                                                 @prefix 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 official work item
                        • Community Group drafts final 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 defines a subject             "name": "Gregg Kellogg",
                                             "knows": "http://www.markus-lanthaler.com/"
                definition                }




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 defines a subject             "name": "Gregg Kellogg",
                                             "knows": "http://www.markus-lanthaler.com/"
                definition                }

         •      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 defines a subject                   "name": "Gregg Kellogg",
                                                   "knows": "http://www.markus-lanthaler.com/"
                definition                      }

         •      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
•      Define 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
•      Define 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
•      Define 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
•
                                           {
                Define referenced subject       "@context": "http://json-ld.org/contexts/person",
                definition 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 identifies an object with @id in the same document, or references an
external document (Linked Data).
•
                                           {
                Define referenced subject       "@context": "http://json-ld.org/contexts/person",
                definition 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",
                                               "honorificSuffix": {"@value": "M.S.", "@language": "en"},
                                               "knows": {
                                                 "@id": "http://www.markus-lanthaler.com/",
                                                 "@type": "Person",
                                                 "name": "Markus Lanthaler",
                                                 "honorificSuffix": {"@value": "Dipl.Ing.", "@language": "de"},
                                                 "knows" "http://greggkellogg.net/foaf#me"
                                               }
                                           }

Tuesday, July 10, 12

Subject reference identifies 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 defined       "@type": "Person",
                                                "name": "Gregg Kellogg",
                resources.                      "birthDate": {"@value": "1957-02-27", "@type": "xsd:date"},
                                                "honorificSuffix": {"@value": "M.S.", "@language": "en"},
                                                "knows": "http://www.markus-lanthaler.com/"
                                            }




Tuesday, July 10, 12
•      Add property @type and    {
                                               "@context": {
                 @language definitions to          "schema": "http://schema.org/",
                 context                          "Person": "schema:Person",
                                                  "name": "schema:name",
                                                  "birthDate”: {
                                                     "@id": "schema: birthDate","@type": "xsd:date"
                                                  },
                                                  "honorificSuffix”: {
                                                     "@id": "schema:honorificSuffix","@language": "en"
                                                  },
                                                  "knows”: {"@id": "schema:knows","@type": "@id"}
                                               },
                                               "@id": "http://greggkellogg.net/foaf#me",
                                               "@type": "Person",
                                               "name": "Gregg Kellogg",
                                               "birthDate": "1957-02-27",
                                               "honorificSuffix": "M.S.",
                                               "knows": "http://www.markus-lanthaler.com/"
                                           }




Tuesday, July 10, 12
• More features defined in the syntax
                            specification*:

                          • @set, @list, Compact IRIs, Unlabeled
                                 Nodes

                          • Embedded @context definitions
                          • Named Graphs
                   * http://json-ld.org/spec/latest/json-ld-syntax


Tuesday, July 10, 12
Retrofit 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/profile_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 first-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 first-class                                         http://greggkellogg.net/foaf

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

            •    Object definitions 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 definitions
                       • 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

Más contenido relacionado

La actualidad más candente

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
 
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
 

La actualidad más candente (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
 

Destacado (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 a 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 a 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
 

Último

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Último (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

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 defined 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 defined 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"} } } { @prefix 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 official work item • Community Group drafts final 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 defines a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" definition } 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 defines a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" definition } • 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 defines a subject "name": "Gregg Kellogg", "knows": "http://www.markus-lanthaler.com/" definition } • 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. Define 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. Define 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. Define 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. { Define referenced subject "@context": "http://json-ld.org/contexts/person", definition 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 identifies an object with @id in the same document, or references an external document (Linked Data).
  • 19. { Define referenced subject "@context": "http://json-ld.org/contexts/person", definition 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", "honorificSuffix": {"@value": "M.S.", "@language": "en"}, "knows": { "@id": "http://www.markus-lanthaler.com/", "@type": "Person", "name": "Markus Lanthaler", "honorificSuffix": {"@value": "Dipl.Ing.", "@language": "de"}, "knows" "http://greggkellogg.net/foaf#me" } } Tuesday, July 10, 12 Subject reference identifies 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 defined "@type": "Person", "name": "Gregg Kellogg", resources. "birthDate": {"@value": "1957-02-27", "@type": "xsd:date"}, "honorificSuffix": {"@value": "M.S.", "@language": "en"}, "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 21. Add property @type and { "@context": { @language definitions to "schema": "http://schema.org/", context "Person": "schema:Person", "name": "schema:name", "birthDate”: { "@id": "schema: birthDate","@type": "xsd:date" }, "honorificSuffix”: { "@id": "schema:honorificSuffix","@language": "en" }, "knows”: {"@id": "schema:knows","@type": "@id"} }, "@id": "http://greggkellogg.net/foaf#me", "@type": "Person", "name": "Gregg Kellogg", "birthDate": "1957-02-27", "honorificSuffix": "M.S.", "knows": "http://www.markus-lanthaler.com/" } Tuesday, July 10, 12
  • 22. • More features defined in the syntax specification*: • @set, @list, Compact IRIs, Unlabeled Nodes • Embedded @context definitions • Named Graphs * http://json-ld.org/spec/latest/json-ld-syntax Tuesday, July 10, 12
  • 23. Retrofit 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/profile_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 first-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 first-class http://greggkellogg.net/foaf citizens { "@context": "http://json-ld.org/contexts/person", • Object definitions 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 definitions • 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