json-ld joint session · •json-ld wg end of charter: june 2020 •td must reference json-ld 1.0...
TRANSCRIPT
![Page 1: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/1.jpg)
JSON-LD Joint Session
Lyon, France, October 2018
![Page 2: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/2.jpg)
DEFINING @ID OF THING
![Page 3: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/3.jpg)
Defining @id of Thing without @context in TD
• "id" field in TD should define the unique identifier of the Thing
• Goal: It should set the @id of the top-level Thing node
• This would actually require{
"@context": { "@base": "urn:dev:org:32473-0815" },
"name": "MyThing",
…
• We want to enable TDs to work without explicit @context field
• Remote context is applied based on the application/td+json media type{
"id": "urn:dev:org:32473-0815",
"name": "MyThing",
…
![Page 4: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/4.jpg)
Proposal
• Use the following declaration in the remote TD context
"@base": "@id"
• (and an alias "id" for the JSON-LD keyword)
"id": "@id"
• The "@base": "@id" declaration would also help with the next issue…
![Page 5: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/5.jpg)
@ID COLLISION
![Page 6: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/6.jpg)
@id Collision of Nested Object Keys
{"id": "urn:dev:org:32473-0815",…"properties": {
"PumpStatus": {"writable": false,"type": "object", "properties": {
"PumpStatus": {"type": "boolean“
}…
TD
Interaction Property PumpStatus URI is overridden by Data sub-property PumpStatus
{"id": "urn:dev:…",…"properties": [{
"@id": "PumpStatus","writable": false,"type": "object", "properties": [{
"@id": "PumpStatus","type": "boolean"
}…
RDF Triples
<urn:dev:org:32473-0815> <http://www.w3.org/ns/td#properties> <urn:dev:org:32473-0815/PumpStatus> .<urn:dev:org:32473-0815/PumpStatus> <http://www.w3.org/ns/td#writable> "false" .<urn:dev:org:32473-0815/PumpStatus> <http://www.w3.org/ns/json-schema#type> "object" .
<urn:dev:org:32473-0815/PumpStatus> <http://www.w3.org/ns/td#properties> <urn:dev:org:32473-0815/PumpStatus> .<urn:dev:org:32473-0815/PumpStatus> <http://www.w3.org/ns/json-schema#type> "boolean" .
* TD object keys resolved to @id predicates (from "@container": "@id" declaration)
JSON-LD*
TD context uses "@container": "@id" declaration to use objects instead of arrays
![Page 7: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/7.jpg)
Issue
• "@base": "@id" does not really help because of URI resolution algorithm– urn:dev:org:32473-0815 + PumpStatus
urn:dev:org:32473-0815/PumpStatus
– urn:dev:org:32473-0815/PumpStatus + PumpStatus urn:dev:org:32473-0815/PumpStatus
• Relative @id require slashes– urn:dev:org:32473-0815/PumpStatus/ + PumpStatus
urn:dev:org:32473-0815/PumpStatus/PumpStatus
– urn:dev:org:32473-0815/PumpStatus + ./PumpStatus urn:dev:org:32473-0815/PumpStatus/PumpStatus
• That would mean non-idiomatic keys: … "properties": { "PumpStatus/": { …
![Page 8: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/8.jpg)
Proposal
• Use a declaration like
"@container": "@path"
• Maps tree structure of JSON to a URI path structure by inserting slashes
• Compacting would require prefix matching and reduction to relative URIs
• Allows for idiomatic JSON!
![Page 9: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/9.jpg)
INTERNATIONALIZATION
![Page 10: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/10.jpg)
Issue: Direction (ltr vs rtl)
• TD would prefer "@container": "@language" for the following syntax
"title": {"en": "Brightness","de": "Helligkeit"
}
• Does not allow HTML markup, as "@type": "rdf:html" cannot be set
• Unicode encodes directions, but can fail– i18n list of what renders correctly
• Can provide text on limitations
![Page 11: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/11.jpg)
REMOTE CONTEXT PRIVACY LEAK
![Page 12: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/12.jpg)
Warning
• Loading remote contexts leaks information about what data is currentlybeing processed or with what Things is being communicated
• XML makes use of resolvers that control what is actually fetched
• JSON-LD document loader with white-/blacklisting
• Provide information in security considerations
![Page 13: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/13.jpg)
TD DELIVERABLE AND TIMELINE
![Page 14: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/14.jpg)
Tight Schedule
• End of current charter: 31 Dec 2018 Extension until 30 June 2018
• Candidate REC in Jan 2018
• Proposed REC about April 2018
• REC latest in June 2018
• JSON-LD WG end of charter: June 2020
• TD must reference JSON-LD 1.0 REC and define algorithm– Justifies use of concrete media type instead of JSON-LD with profile parameter
– Update can provide revised reference and algorithm for JSON-LD 1.1 once REC
![Page 15: JSON-LD Joint Session · •JSON-LD WG end of charter: June 2020 •TD must reference JSON-LD 1.0 REC and define algorithm –Justifies use of concrete media type instead of JSON-LD](https://reader034.vdocument.in/reader034/viewer/2022050402/5f80577328335d1d72125298/html5/thumbnails/15.jpg)
Contact
Matthias Kovatsch
Sebastian Kaebisch