JSON-LD for RESTful services

JSON-LD
for RESTful Services
Markus Lanthaler
Graz University of Technology
Web APIs are becoming a must-have
JSON-LD for RESTful services
JSON-LD for RESTful services
- Layered system
Semaphobia!?
Linked Data Graph
JSON-LD for RESTful services
JSON-LD for RESTful services
Example




          Jane Doe
http://example.com/persons/{id}

{
    "id": "mlanthaler",
    "name": "Markus Lanthaler",
    "title": {
      "de": "Dipl.Ing.",
      "en": "MSc"
    },
    "workHomepage": "http://www.tugraz.at",
    "knows": [
      { "id": "johndoe", "name": "John Doe" },
      { "id": "janedoe", "name": "Jane Doe" }
    ]
}
{
    "@id": "mlanthaler",
    "name": "Markus Lanthaler",
    "title": [
      { "@language": "de", "@value": "Dipl.Ing." },
      { "@language": "en", "@value": "MSc" }
    ],
    "workHomepage": "http://www.tugraz.at",
    "knows": [
      { "@id": "johndoe", "name": "John Doe" },
      { "@id": "janedoe", "name": "Jane Doe" }
    ]
}                        {
                             "@context": {
                               "foaf": "http://xmlns.com/foaf/0.1/",
                               "name": "foaf:name",
                               "title": "foaf:title",
                               "workHomepage": {
                                  "@id": "foaf:workplaceHomepage",
                                  "@type": "@id"
                               },
                               "knows": "foaf:knows"
                             }
                         }
Link: </context.jsonld>; rel="describedby"
{
    "id": "mlanthaler",
    "name": "Markus Lanthaler",
    "title_de": "Dipl.Ing.",
    "title_en": "MSc",
    "homepage": "http://www.tugraz.at",
    "knows": [
      { "id": "johndoe", "name": "John Doe" },
      { "id": "janedoe", "name": "Jane Doe" }
    ]
}

{
    "@context": {
      "foaf": "http://xmlns.com/foaf/0.1/",
      "name": "foaf:name",
      "title_de": { "@id": "foaf:title", "@language": "de" },
      "title_en": { "@id": "foaf:title", "@language": "en" },
      "homepage": { "@id": "foaf:workplaceHomepage", "@type": "@id" },
      "knows": "foaf:knows",
      "id": "@id"
    }
}
@context
                                         @id




         @language                                    @list
                                               @set
@value
          @type                                  @container
                                @graph
kTBS
JSON-LD for RESTful services
Thank You



© 2011, Markus Lanthaler. Some Rights Reserved.
http://creativecommons.org/licenses/by-nc-sa/3.0/
Questions?




Markus Lanthaler                     @MarkusLanthaler
Markus.Lanthaler@student.TUGraz.at   http://www.slideshare.net/lanthaler
Image Credits
(1)   http://www.flickr.com/photos/bestrated1/49371264/
(2)   http://www.flickr.com/photos/johnmcnab/3759095224/
(3)   http://www.flickr.com/photos/alexdram/3095419858/
(4)   Adapted from: http://www.flickr.com/photos/elektronaut/243067805/
(7)   http://en.wikipedia.org/wiki/The_Scream
1 of 19

More Related Content

What's hot(20)

SHACL by exampleSHACL by example
SHACL by example
Jose Emilio Labra Gayo13.6K views
ShEx vs SHACLShEx vs SHACL
ShEx vs SHACL
Jose Emilio Labra Gayo5.6K views
Spring data jpaSpring data jpa
Spring data jpa
Jeevesh Pandey4.1K views
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
MongoDB1.8K views
A Deep Dive into JSON-LD and HydraA Deep Dive into JSON-LD and Hydra
A Deep Dive into JSON-LD and Hydra
Markus Lanthaler9.8K views
JsonJson
Json
Sabarinath Gnanasekar414 views
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
MongoDB7.2K views
React & GraphQLReact & GraphQL
React & GraphQL
Nikolas Burk909 views
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
Young-Ho Cho20K views
RDF data validation 2017 SHACLRDF data validation 2017 SHACL
RDF data validation 2017 SHACL
Jean-Paul Calbimonte901 views

More from Markus Lanthaler(11)

JSON-LD for RESTful services

  • 1. JSON-LD for RESTful Services Markus Lanthaler Graz University of Technology
  • 2. Web APIs are becoming a must-have
  • 10. Example Jane Doe
  • 11. http://example.com/persons/{id} { "id": "mlanthaler", "name": "Markus Lanthaler", "title": { "de": "Dipl.Ing.", "en": "MSc" }, "workHomepage": "http://www.tugraz.at", "knows": [ { "id": "johndoe", "name": "John Doe" }, { "id": "janedoe", "name": "Jane Doe" } ] }
  • 12. { "@id": "mlanthaler", "name": "Markus Lanthaler", "title": [ { "@language": "de", "@value": "Dipl.Ing." }, { "@language": "en", "@value": "MSc" } ], "workHomepage": "http://www.tugraz.at", "knows": [ { "@id": "johndoe", "name": "John Doe" }, { "@id": "janedoe", "name": "Jane Doe" } ] } { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "name": "foaf:name", "title": "foaf:title", "workHomepage": { "@id": "foaf:workplaceHomepage", "@type": "@id" }, "knows": "foaf:knows" } }
  • 13. Link: </context.jsonld>; rel="describedby" { "id": "mlanthaler", "name": "Markus Lanthaler", "title_de": "Dipl.Ing.", "title_en": "MSc", "homepage": "http://www.tugraz.at", "knows": [ { "id": "johndoe", "name": "John Doe" }, { "id": "janedoe", "name": "Jane Doe" } ] } { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "name": "foaf:name", "title_de": { "@id": "foaf:title", "@language": "de" }, "title_en": { "@id": "foaf:title", "@language": "en" }, "homepage": { "@id": "foaf:workplaceHomepage", "@type": "@id" }, "knows": "foaf:knows", "id": "@id" } }
  • 14. @context @id @language @list @set @value @type @container @graph
  • 15. kTBS
  • 17. Thank You © 2011, Markus Lanthaler. Some Rights Reserved. http://creativecommons.org/licenses/by-nc-sa/3.0/
  • 18. Questions? Markus Lanthaler @MarkusLanthaler Markus.Lanthaler@student.TUGraz.at http://www.slideshare.net/lanthaler
  • 19. Image Credits (1) http://www.flickr.com/photos/bestrated1/49371264/ (2) http://www.flickr.com/photos/johnmcnab/3759095224/ (3) http://www.flickr.com/photos/alexdram/3095419858/ (4) Adapted from: http://www.flickr.com/photos/elektronaut/243067805/ (7) http://en.wikipedia.org/wiki/The_Scream