aurelijus banelis · 2017. 8. 1. · learn json-ld playground php libraries 2nd fetch rest for...
TRANSCRIPT
Aurelijus Banelis
is W3C standard
2In short
Examples
Specification
solves naming problem
3Problem
Service 3
Service 1 Service 2
solves naming problem
4
“Apple”“Apple” Service 3
Service 1 Service 2
Problem
solves naming problem
5
Service 3
Service 1 Service 2
“Apple”“Apple”
Problem
solves naming problem
6
“https://www.apple.com/
v/home/bq/images/
og.jpg”
“http://dreamatico.com/
data_images/Apple/
apple-7.jpg”Service 3
Service 1 Service 2
Problem
solves naming problem
7
“ac:og.jpg”“dc:apple-7.jpg”Service 3
Service 1 Service 2
Problem
Linked data example
8
parent
posX posX posYposY
2 12345
12integer
13integer
14integer
15integer
Example
From simple JSON
9
{ "nodes": [ { "id": "12345", "posX": 12, "posY": 14, "parent": null }, { "id": "2", "posX": 15, "posY": 16, "parent": "12345" } ]}
Example
To JSON-LD
10
{ "@context": "http://auginte.com/ns/s.jsonld", "nodes": [ { "@id": "gn:12345", "posX": 12, "posY": 14, "parent": null }, { "@id": "gn:2", "posX": 15, "posY": 16, "parent": "gn:12345" } ]}
Example
@id
gn:
@context
For computer
11
[{"http://auginte.com/ns/v0.6/node/list": [ {"@id": "auginte://localhost/zooming/nodes/12345", "http://auginte.com/ns/v0.6/node/x": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 12}], "http://auginte.com/ns/v0.6/node/y": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 14 }] }, {"@id": "auginte://localhost/zooming/nodes/2", "http://auginte.com/ns/v0.6/reference/node/parent": [ {"@id": "auginte://localhost/zooming/nodes/12345"}], "http://auginte.com/ns/v0.6/node/x": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 15}], "http://auginte.com/ns/v0.6/node/y": [ {"@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": 16 } ]}]}] https://github.com/aurelijusb/example-jsonld-php/
http://json-ld.org/playground/index.html
Representation
key
value
type
Why and where (not) to use
Learn JSON-LD Playground
PHP Libraries
REST2nd fetchfor context
StorageOrientDBexport JSON
FrontendBackend
Scala.jsPrickle
Cross language
ProtobufThrift
Semantinc WEB
RDFcompatible
SEO As microdata(not all)
Pros & cons 12
*Personal opinion
Conclusion
Do not reinvent the wheel
Use standardsFor right jobThere is no one-fits-all solution
So 13
Questions?
Do not reinvent the wheel
Use standardsFor right jobThere is no one-fits-all solution
? 14
Slides already at: aurelijus.banelis.lt
References and useful links
15i
●http://json-ld.org/ ●https://github.com/aurelijusb/example-jsonld-php/●https://github.com/lanthaler/JsonLD●http://www.w3.org/TR/json-ld/●https://developers.google.com/webmasters/business-location-pages/schema.org-examples ●https://schema.org ●https://developers.google.com/structured-data/testing-tool/●https://github.com/json-ld/json-ld.org/wiki/Users-of-JSON-LD●http://www.markus-lanthaler.com/hydra/●