SlideShare a Scribd company logo
1 of 16
Download to read offline
JSON-LD Update
State of JSON-LD in 2017
1
Gregg Kellogg

gregg@greggkellogg.net

@gkellogg
http://www.slideshare.net/gkellogg1/jsonld-update
Quite Successful Format
• The October 2016 Common Crawl reports over 2 million
(out of 3 million) HTML pages include JSON-LD [1].
• JSON-LD is one of the formats supported by schema.org,
in addition to Microdata and RDFa [2].
• JSON-LD is a required format in the Linked Data platform
[3].
• JSON-LD is becoming popular for many other REST APIs.
2
[1] webdatacommons.org/structureddata/#results-2016-1
[2] http://blog.schema.org/2013/06/schemaorg-and-json-ld.html

[3] https://www.w3.org/TR/ldp/
Keys to Success
• A primary goal was to allow JSON developers to
use it as if it is normal JSON.
The syntax is designed to not disturb already deployed systems running on
JSON, but provide a smooth upgrade path from JSON to JSON-LD. Since the
shape of such data varies wildly, JSON-LD features mechanisms to reshape
documents into a deterministic structure which simplifies their processing [4].
• JSON-LD allows developers to focus on the JSON,
but modelers to get back to the RDF data model for
semantic analysis and validation.
3
[4] https://www.w3.org/TR/json-ld/
JSON-LD – Key Features
• Add @context to JSON to associate terms (properties) with
IRIs which define them.
• Describe the expected types for string values of properties
• IRI, Dates, Numbers, …
• Treat collections as lists or sets.
• Encourage the use of well-known identifiers for entities, and
provide typing (@id and @type).
• (much more, see JSON-LD 1.0 for a complete feature set).
4
JSON-LD 1.1
• It’s been three years since JSON-LD 1.0 was published, and feature
requests have been mounting:
• Use objects to index into collections, rather than an array form
• Previously restricted to @index and @language. Now available on
@id and @type.
• Framing, never complete in 1.0. Now provides ability to match on @id,
inclusive or exclusive @type, property values, and specifics of a value
object.
• Contexts scoped to terms: property values or entities using a given
type term can overlay terms-specific contexts.
• Ignore some elements of JSON structure.
5
@id Maps
6
{
"@context":
{
"schema": "http://schema.org/",
"name": "schema:name",
"body": "schema:articleBody",
"words": "schema:wordCount",
"post": {
"@id": "schema:blogPost",
"@container": "@id"
}
},
"@id": "http://example.com/",
"@type": "schema:Blog",
"name": "World Financial News",
"post": {
"http://example.com/posts/1/en": {
"body": "World commodities were up today with heavy trading of crude oil...",
"words": 1539
},
"http://example.com/posts/1/de": {
"body": "Die Werte an Warenbörsen stiegen im Sog eines starken Handels von Rohöl...",
"words": 1204
}
}
}
Nested Properties
7
{
"@context": {
"skos": "http://www.w3.org/2004/02/skos/core#",
"labels": "@nest",
"main_label": {"@id": "skos:prefLabel"},
"other_label": {"@id": "skos:altLabel"},
"homepage": {"@id": "http://schema.org/description", "@type": "@id"}
},
"@id": "http://example.org/myresource",
"homepage": "http://example.org",
"labels": {
"main_label": "This is the main label for my resource",
"other_label": "This is the other label"
}
}
Scoped Contexts
8
{
"@context":
{
"name": "http://schema.org/name",
"interest": {
"@id":"http://xmlns.com/foaf/0.1/interest",
"@context": {"@vocab": "http://xmlns.com/foaf/0.1/"}
}
},
"name": "Manu Sporny",
"interest": {
"@id": "https://www.w3.org/TR/json-ld/",
"name": "JSON-LD",
"topic": "Linking Data"
}
}
Scoped Contexts (@type)
9
{
"@context":
{
"name": "http://schema.org/name",
"interest": "http://xmlns.com/foaf/0.1/interest",
"Document": {
"@id": "http://xmlns.com/foaf/0.1/Document",
"@context": {"@vocab": "http://xmlns.com/foaf/0.1/"}
}
},
"@type": "Person",
"name": "Manu Sporny",
"interest": {
"@id": "https://www.w3.org/TR/json-ld/",
"@type": "Document",
"name": "JSON-LD",
"topic": "Linking Data"
}
}
JSON-LD 1.1 Timeline
• All work being done in Community Group [5][6].
• With enough interest, a Working Group could be spun up to create a
Recommendation, and possibly address additional requirements.
• Topic for TPAC 2017?
• Expect community drafts to complete in Q2 2017.
• Ruby implementation conforms to all changes in CG specs
• Changes likely easily applied to Python, Javascript, PHP, Java, C#, Go
and other implementations.
• Still no publicly available implementation in “C”.
10
[5] https://www.w3.org/community/json-ld/
[6] http://json-ld.org
Related Topics for
Web of Things
11
Shape Expressions (ShEx)
• ShEx [7] is used for
validating graph
patterns, similar to,
but less complex then
SHACL.
• JSON grammar is
JSON-LD/RDF. Also
has Compact
Grammar.
12
[7] https://shexspec.github.io/spec
ex:PersonShape {
foaf:name .
}
ex:EmployeeShape {
&ex:PersonShape ;
ex:employeeNumber .
}
{ "type":"Schema", "shapes": [{
"id": "http://schema.example/PersonShape",
“type": "Shape", "expression": {
"type": "TripleConstraint",
"predicate": "http://xmlns.com/foaf/0.1/
name"
}
}, {
"id": "http://schema.example/EmployeeShape":,
"type": "Shape", "expression": {
“type": "EachOf", "shapeExprs": [
“http://schema.example/PersonShape",
{ "type": "TripleConstraint",
"predicate": "http://schema.example/
employeeNumber" }
]
}
}]
}
Decentralized Identifiers
• The WebDHT [8] proposes to use the block-chain
for as an identifier space with immutable content in
the block chain.
• Content is a JSON-LD document, so may be used
as the target of a @context.
• Content will not change, so may be cached or
distributed out-of-band.
• Content signed to guarantee veracity.
13
[8] http://opencreds.org/specs/source/webdht/
Linked Data Signatures
• Mechanism for signing Linked Data documents [9]
• Part of the work of the Digital Verification Community Group [10]
14
[9] https://w3c-dvcg.github.io/ld-signatures/
[10] https://w3c-dvcg.github.io/
{
"@context": "https://w3id.org/identity/v1",
"title": "Hello World!",
"signature": {
"type": "LinkedDataSignature2015",
"creator": "http://example.com/i/pat/keys/5",
"created": "2011-09-23T20:21:34Z",
"domain": "example.org",
"nonce": "2bbgh3dgjg2302d-d2b3gi423d42",
"signatureValue": "OGQzNGVkMzVm4NTIyZTkZDY...NmExMgoYzI43Q3ODIyOWM32NjI="
}
}
RDF Dataset Normalization
• Creates a reproducible hash of an RDF Dataset
[11].
• Derived from JSON-LD using toRdf algorithm.
• Basis of signing linked data
• Not tied to syntax, so invariant to minor formatting
changes
15
[11] http://json-ld.github.io/normalization/spec/
Verifiable Claims
• Close to becoming a
Working group [12].
• Could be a source
of identity for WoT.
• Defines a data
model and syntax for
making claims [13].
16
[12] http://w3c.github.io/vctf/charter/proposal.html
[13] https://opencreds.github.io/vc-data-model/

More Related Content

What's hot

Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011
Juan Sequeda
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5
Juan Sequeda
 

What's hot (20)

RDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use itRDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use it
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data Out03. ElasticSearch : Data In, Data Out
03. ElasticSearch : Data In, Data Out
 
Building Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreBuilding Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET Core
 
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
 
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
 
Make your Web resources more discoverable with Bioschemas markup –Bioschemas ...
Make your Web resources more discoverable with Bioschemas markup –Bioschemas ...Make your Web resources more discoverable with Bioschemas markup –Bioschemas ...
Make your Web resources more discoverable with Bioschemas markup –Bioschemas ...
 
Introduction to CouchDB
Introduction to CouchDBIntroduction to CouchDB
Introduction to CouchDB
 
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...
 
Building Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreBuilding Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET Core
 
BigML.io - The BigML API
BigML.io - The BigML APIBigML.io - The BigML API
BigML.io - The BigML API
 
CrossRef Technical Information for Libraries
CrossRef Technical Information for LibrariesCrossRef Technical Information for Libraries
CrossRef Technical Information for Libraries
 
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
 
RDFa in ostala spletna semantika
RDFa in ostala spletna semantikaRDFa in ostala spletna semantika
RDFa in ostala spletna semantika
 
Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011Consuming Linked Data 4/5 Semtech2011
Consuming Linked Data 4/5 Semtech2011
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5
 
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
 
Two Webs! : combining the best of Web 1.0, Web 2.0 and the Semantic Web
Two Webs! : combining the best of Web 1.0, Web 2.0 and the Semantic WebTwo Webs! : combining the best of Web 1.0, Web 2.0 and the Semantic Web
Two Webs! : combining the best of Web 1.0, Web 2.0 and the Semantic Web
 
Semantic Web Applications
Semantic Web ApplicationsSemantic Web Applications
Semantic Web Applications
 

Viewers also liked

Viewers also liked (20)

JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
 
Enabling Multimodel Graphs with Apache TinkerPop
Enabling Multimodel Graphs with Apache TinkerPopEnabling Multimodel Graphs with Apache TinkerPop
Enabling Multimodel Graphs with Apache TinkerPop
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
 
JSON-LD and MongoDB
JSON-LD and MongoDBJSON-LD and MongoDB
JSON-LD and MongoDB
 
Agile Data Science 2.0
Agile Data Science 2.0Agile Data Science 2.0
Agile Data Science 2.0
 
Building Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and HydraBuilding Next-Generation Web APIs with JSON-LD and Hydra
Building Next-Generation Web APIs with JSON-LD and Hydra
 
Your moment is Waiting
Your moment is WaitingYour moment is Waiting
Your moment is Waiting
 
Agile Data Science
Agile Data ScienceAgile Data Science
Agile Data Science
 
Agile Data Science: Building Hadoop Analytics Applications
Agile Data Science: Building Hadoop Analytics ApplicationsAgile Data Science: Building Hadoop Analytics Applications
Agile Data Science: Building Hadoop Analytics Applications
 
Introduction to PySpark
Introduction to PySparkIntroduction to PySpark
Introduction to PySpark
 
Agile Data Science 2.0 - Big Data Science Meetup
Agile Data Science 2.0 - Big Data Science MeetupAgile Data Science 2.0 - Big Data Science Meetup
Agile Data Science 2.0 - Big Data Science Meetup
 
Blistering fast access to Hadoop with SQL
Blistering fast access to Hadoop with SQLBlistering fast access to Hadoop with SQL
Blistering fast access to Hadoop with SQL
 
tarea 7 gabriel
tarea 7 gabrieltarea 7 gabriel
tarea 7 gabriel
 
Agile Data Science: Hadoop Analytics Applications
Agile Data Science: Hadoop Analytics ApplicationsAgile Data Science: Hadoop Analytics Applications
Agile Data Science: Hadoop Analytics Applications
 
Bitraf - Particle Photon IoT workshop
Bitraf - Particle Photon IoT workshopBitraf - Particle Photon IoT workshop
Bitraf - Particle Photon IoT workshop
 
Agile analytics applications on hadoop
Agile analytics applications on hadoopAgile analytics applications on hadoop
Agile analytics applications on hadoop
 
Mapa mental de un lider tahi
Mapa mental de un lider  tahiMapa mental de un lider  tahi
Mapa mental de un lider tahi
 
ConsumerLab: The Self-Driving Future
ConsumerLab: The Self-Driving FutureConsumerLab: The Self-Driving Future
ConsumerLab: The Self-Driving Future
 
Zipcar
ZipcarZipcar
Zipcar
 
Networks All Around Us: Extracting networks from your problem domain
Networks All Around Us: Extracting networks from your problem domainNetworks All Around Us: Extracting networks from your problem domain
Networks All Around Us: Extracting networks from your problem domain
 

Similar to JSON-LD Update

Document Object Model
Document Object ModelDocument Object Model
Document Object Model
chomas kandar
 

Similar to JSON-LD Update (20)

JSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge GraphsJSON-LD and SHACL for Knowledge Graphs
JSON-LD and SHACL for Knowledge Graphs
 
Comparison with storing data using NoSQL(CouchDB) and a relational database.
Comparison with storing data using NoSQL(CouchDB) and a relational database.Comparison with storing data using NoSQL(CouchDB) and a relational database.
Comparison with storing data using NoSQL(CouchDB) and a relational database.
 
RDF SHACL, Annotations, and Data Frames
RDF SHACL, Annotations, and Data FramesRDF SHACL, Annotations, and Data Frames
RDF SHACL, Annotations, and Data Frames
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Database@Home - Data Driven : Loading, Indexing, and Searching with Text and ...
Database@Home - Data Driven : Loading, Indexing, and Searching with Text and ...Database@Home - Data Driven : Loading, Indexing, and Searching with Text and ...
Database@Home - Data Driven : Loading, Indexing, and Searching with Text and ...
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
tutorial2-notes2
tutorial2-notes2tutorial2-notes2
tutorial2-notes2
 
tutorial2-notes2
tutorial2-notes2tutorial2-notes2
tutorial2-notes2
 
The Data Web and PLM
The Data Web and PLMThe Data Web and PLM
The Data Web and PLM
 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of REST
 
SQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 QuestionsSQL to NoSQL: Top 6 Questions
SQL to NoSQL: Top 6 Questions
 
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring Roo
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
Expressing Concept Schemes & Competency Frameworks in CTDL
Expressing Concept Schemes & Competency Frameworks in CTDLExpressing Concept Schemes & Competency Frameworks in CTDL
Expressing Concept Schemes & Competency Frameworks in CTDL
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
RESTful application with JAX-RS and how to expose and test them
RESTful application with JAX-RS and how to expose and test themRESTful application with JAX-RS and how to expose and test them
RESTful application with JAX-RS and how to expose and test them
 
RDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use itRDFa: introduction, comparison with microdata and microformats and how to use it
RDFa: introduction, comparison with microdata and microformats and how to use it
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

JSON-LD Update

  • 1. JSON-LD Update State of JSON-LD in 2017 1 Gregg Kellogg
 gregg@greggkellogg.net
 @gkellogg http://www.slideshare.net/gkellogg1/jsonld-update
  • 2. Quite Successful Format • The October 2016 Common Crawl reports over 2 million (out of 3 million) HTML pages include JSON-LD [1]. • JSON-LD is one of the formats supported by schema.org, in addition to Microdata and RDFa [2]. • JSON-LD is a required format in the Linked Data platform [3]. • JSON-LD is becoming popular for many other REST APIs. 2 [1] webdatacommons.org/structureddata/#results-2016-1 [2] http://blog.schema.org/2013/06/schemaorg-and-json-ld.html
 [3] https://www.w3.org/TR/ldp/
  • 3. Keys to Success • A primary goal was to allow JSON developers to use it as if it is normal JSON. The syntax is designed to not disturb already deployed systems running on JSON, but provide a smooth upgrade path from JSON to JSON-LD. Since the shape of such data varies wildly, JSON-LD features mechanisms to reshape documents into a deterministic structure which simplifies their processing [4]. • JSON-LD allows developers to focus on the JSON, but modelers to get back to the RDF data model for semantic analysis and validation. 3 [4] https://www.w3.org/TR/json-ld/
  • 4. JSON-LD – Key Features • Add @context to JSON to associate terms (properties) with IRIs which define them. • Describe the expected types for string values of properties • IRI, Dates, Numbers, … • Treat collections as lists or sets. • Encourage the use of well-known identifiers for entities, and provide typing (@id and @type). • (much more, see JSON-LD 1.0 for a complete feature set). 4
  • 5. JSON-LD 1.1 • It’s been three years since JSON-LD 1.0 was published, and feature requests have been mounting: • Use objects to index into collections, rather than an array form • Previously restricted to @index and @language. Now available on @id and @type. • Framing, never complete in 1.0. Now provides ability to match on @id, inclusive or exclusive @type, property values, and specifics of a value object. • Contexts scoped to terms: property values or entities using a given type term can overlay terms-specific contexts. • Ignore some elements of JSON structure. 5
  • 6. @id Maps 6 { "@context": { "schema": "http://schema.org/", "name": "schema:name", "body": "schema:articleBody", "words": "schema:wordCount", "post": { "@id": "schema:blogPost", "@container": "@id" } }, "@id": "http://example.com/", "@type": "schema:Blog", "name": "World Financial News", "post": { "http://example.com/posts/1/en": { "body": "World commodities were up today with heavy trading of crude oil...", "words": 1539 }, "http://example.com/posts/1/de": { "body": "Die Werte an Warenbörsen stiegen im Sog eines starken Handels von Rohöl...", "words": 1204 } } }
  • 7. Nested Properties 7 { "@context": { "skos": "http://www.w3.org/2004/02/skos/core#", "labels": "@nest", "main_label": {"@id": "skos:prefLabel"}, "other_label": {"@id": "skos:altLabel"}, "homepage": {"@id": "http://schema.org/description", "@type": "@id"} }, "@id": "http://example.org/myresource", "homepage": "http://example.org", "labels": { "main_label": "This is the main label for my resource", "other_label": "This is the other label" } }
  • 8. Scoped Contexts 8 { "@context": { "name": "http://schema.org/name", "interest": { "@id":"http://xmlns.com/foaf/0.1/interest", "@context": {"@vocab": "http://xmlns.com/foaf/0.1/"} } }, "name": "Manu Sporny", "interest": { "@id": "https://www.w3.org/TR/json-ld/", "name": "JSON-LD", "topic": "Linking Data" } }
  • 9. Scoped Contexts (@type) 9 { "@context": { "name": "http://schema.org/name", "interest": "http://xmlns.com/foaf/0.1/interest", "Document": { "@id": "http://xmlns.com/foaf/0.1/Document", "@context": {"@vocab": "http://xmlns.com/foaf/0.1/"} } }, "@type": "Person", "name": "Manu Sporny", "interest": { "@id": "https://www.w3.org/TR/json-ld/", "@type": "Document", "name": "JSON-LD", "topic": "Linking Data" } }
  • 10. JSON-LD 1.1 Timeline • All work being done in Community Group [5][6]. • With enough interest, a Working Group could be spun up to create a Recommendation, and possibly address additional requirements. • Topic for TPAC 2017? • Expect community drafts to complete in Q2 2017. • Ruby implementation conforms to all changes in CG specs • Changes likely easily applied to Python, Javascript, PHP, Java, C#, Go and other implementations. • Still no publicly available implementation in “C”. 10 [5] https://www.w3.org/community/json-ld/ [6] http://json-ld.org
  • 11. Related Topics for Web of Things 11
  • 12. Shape Expressions (ShEx) • ShEx [7] is used for validating graph patterns, similar to, but less complex then SHACL. • JSON grammar is JSON-LD/RDF. Also has Compact Grammar. 12 [7] https://shexspec.github.io/spec ex:PersonShape { foaf:name . } ex:EmployeeShape { &ex:PersonShape ; ex:employeeNumber . } { "type":"Schema", "shapes": [{ "id": "http://schema.example/PersonShape", “type": "Shape", "expression": { "type": "TripleConstraint", "predicate": "http://xmlns.com/foaf/0.1/ name" } }, { "id": "http://schema.example/EmployeeShape":, "type": "Shape", "expression": { “type": "EachOf", "shapeExprs": [ “http://schema.example/PersonShape", { "type": "TripleConstraint", "predicate": "http://schema.example/ employeeNumber" } ] } }] }
  • 13. Decentralized Identifiers • The WebDHT [8] proposes to use the block-chain for as an identifier space with immutable content in the block chain. • Content is a JSON-LD document, so may be used as the target of a @context. • Content will not change, so may be cached or distributed out-of-band. • Content signed to guarantee veracity. 13 [8] http://opencreds.org/specs/source/webdht/
  • 14. Linked Data Signatures • Mechanism for signing Linked Data documents [9] • Part of the work of the Digital Verification Community Group [10] 14 [9] https://w3c-dvcg.github.io/ld-signatures/ [10] https://w3c-dvcg.github.io/ { "@context": "https://w3id.org/identity/v1", "title": "Hello World!", "signature": { "type": "LinkedDataSignature2015", "creator": "http://example.com/i/pat/keys/5", "created": "2011-09-23T20:21:34Z", "domain": "example.org", "nonce": "2bbgh3dgjg2302d-d2b3gi423d42", "signatureValue": "OGQzNGVkMzVm4NTIyZTkZDY...NmExMgoYzI43Q3ODIyOWM32NjI=" } }
  • 15. RDF Dataset Normalization • Creates a reproducible hash of an RDF Dataset [11]. • Derived from JSON-LD using toRdf algorithm. • Basis of signing linked data • Not tied to syntax, so invariant to minor formatting changes 15 [11] http://json-ld.github.io/normalization/spec/
  • 16. Verifiable Claims • Close to becoming a Working group [12]. • Could be a source of identity for WoT. • Defines a data model and syntax for making claims [13]. 16 [12] http://w3c.github.io/vctf/charter/proposal.html [13] https://opencreds.github.io/vc-data-model/