Closed gkellogg closed 7 years ago
PROPOSAL: JSON/RDF representation for "unbounded" will be -1
REASON: JSON-LD 1.0 value processing doesn't properly expand numbers when @type: @vocab
(or @id
). Proposed fix for JSON-LD 1.1, but target for ShEx is 1.0.
PARTICIPANTS: @gkellogg, @ericprud
Resolved to accept the use of -1 for unbounded on 3/24/2017 telecon.
Trying to be clever, I defined the "max" term as
{"@id": "shex:max", "@type": "@vocab"}
, thinking that an integer, such as2
is a native value, and not a string, so the@vocab
would not come into play. Unfortunately, this seems to not be the case in JSON-LD 1.1 (I filed json-ld/json-ld.org#470 to address in JSON-LD 1.1, but that doesn't help us now). Consequently, I think we can't simply use"max": "unbounded"
, but will need to use"max": {"@id": "shex:unbounded"}
, and change the term definition for "max" back to{"@id": "shex:max", "@type": "xsd;integer"}
, so that a JSON-LD processor will handle it properly.Alternatively, we could make the term change and continue to use
"max": "unbounded"
, which would result in an invalid literal"unbounded"^^xsd:integer
.We could also consider using something like a negative number, to indicate unbounded:
"max": -1
, which would at least result in a valid literal.