Comments (11)
This is redundant now, as the spec only allows absolute IRIs.
from json-ld.org.
The spec supports relative IRIs, absolute IRIs, and prefixes:
http://json-ld.org/spec/ED/json-ld-syntax/20120122/#iris
from json-ld.org.
Definitions of absolute and relative IRIs added to commit ae24034.
from json-ld.org.
This defines what an absolute IRI is but not necessarily how we recognize one. Should we have something like:
if no term and prefix matches but the following regex (TBD) matches, the value is considered to be an absolute IRI?
from json-ld.org.
The problem is, it is very difficult to distinguish an IRI from a compact IRI (CURIE). As mentioned on the call, one way is to limit the value space of the suffix portion to exclude values that begin with '//', but this is not fool-proof, as there are IRI schemes that do not need to begin with '//', such as 'mailto'. The proposed updated CURIE grammar for RDFa is the following:
curie ::= [ [ prefix ] ':' ] reference
reference ::= ( ipath-absolute / ipath-rootless / ipath-empty )
[ "?" iquery ] [ "#" ifragment ]
We could consider the reference portion for the definition of suffix in JSON-LD, but I think we agreed on today's telecon that this was premature.
Practically speaking, in JSON-LD, a CURIE is recognized when the prefix is defined as a term in the active context, and otherwise, the value is treated as an absolute IRI. I propose that we add this definition and resolve the issue.
from json-ld.org.
In other words you would propose that if a term contains a colon but the prefix isn't defined it is treated as an absolute IRI, right?
from json-ld.org.
Yes, I believe that's what I just said.
from json-ld.org.
OK.. that would basically that all terms with colons would result in an IRI but probably there's no other technical solution without relying on a list of allowed schemas.
from json-ld.org.
PROPOSAL: If a key in a JSON-LD document contains a colon, it is a CompactIRI if the prefix is defined as a term in the active context, otherwise it is an AbsoluteIRI.
from json-ld.org.
+1
If we are going to define it that way we need to add a note in the spec saying that keys with colons are ALWAYS mapped to an IRI - there's no way around this. The only thing we could do is to specify an escape character (which could also work with the @ keywords)... but I don't know if we really need to go that far.
from json-ld.org.
RESOLVED: If a key in a JSON-LD document contains a colon and the first colon is not followed by "//", it is a CompactIRI if the prefix is defined as a term in the active context, otherwise it is an AbsoluteIRI.
from json-ld.org.
Related Issues (20)
- Framing primitive types vs typed literals HOT 1
- create a repo for NDJSON-LD HOT 2
- create a repo for NDJSON-LD [1] HOT 1
- Playground is choking on `http://schema.org` (no trailing slash) HOT 4
- Json ld
- Change redirect for RDF Dataset Canonicalization to WG spec
- json-ld.org site is down HOT 2
- playground error: read properties of null HOT 2
- Proposal: Using `@graph` to specify the name of the graph which contains a statement
- JSON-LD for R? HOT 2
- @base treats trailing hash ('#') different from slash '/' HOT 3
- Improve playground proxy and/or playground document loader HOT 3
- Output N-Quads in the Playground
- proposal for @shift keyword HOT 7
- Issue compacting using a context with a property value index HOT 2
- Creating a gist fails HOT 4
- JSON-LD Context similarity to XML External Entity attack HOT 1
- Recursive index map of index maps HOT 4
- How to combine two or more script into one using json-ld
- type-scoped local context is not applied if the @type property is @nested HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-ld.org.