-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use the frame
and framed
profiles?
#133
Comments
frame
and framed
profiles?frame
and framed
profiles?
IIRC, the WG determined that it was outside scope to actually define how to specify a frame to use when requesting framed document form. This is discussed in the transcript part of #21 (comment) to a degree and in w3c/json-ld-syntax#8 (comment). We rejected defining a specific way to identify a particular context or frame due to security concerns. The notion was that a white-list of specific frames and contexts might be acceptable, but arbitrary documents was not something we could do. Note the specifying both a context and a frame would be redundant, as framing compacts using the context contained within the frame document.
No, they just specify that you'd like the document returned in compacted or framed form, without specifying a way to define the specific context of frame to use. Applications may define their own profiles for doing this. Note that section 6.1 Interpreting JSON as JSON-LD does provide a way to specify a document, but in our infinite wisdom, it does not apply to application/ld+json.
Yes, for example "compacted and framed".
The version can be specified through the API; there isn't a way to do it using HTTP headers that I can recall. Generally, JSON-LD 1.1 is forward compatible with 1.0, so the emphasis was on ensuring that a 1.0 processor wouldn't incorrectly process a 1.1 document. |
hi @gkellogg !
Seems a reasonable concern, and advising servers to only allow whitelisted frame docs is sound advise.
Requesting 1.0 vs 1.1: can I raise such an issue, and which would be the appropriate project? |
No way to request a particular Frame, nor to request 1.0 vs 1.1. |
You can request 1.0 via the API, but there's no CN way to do it that I can think of. The rationale was that 1.1 was forwards compatible with 1.0, and some of the differences (e.g., use of The best we could probably do on specifying a particular frame to use would be some group Note, due to the security concerns noted. Of course, such a note can always be drafted and be a WG Note if it is approved by the WG. (Getting a quorum is probably the hardest part, right now). It may be that the best place would be to add it to the current Best Practices Note. Contributions to this note are encouraged. As an aside, I see that the permanent location of that note (https://www.w3.org/TR/json-ld-bp/), which may not even be correct for a Note, is 404 not found, so the group needs to do something to address that. Also, the top result on Google is the old CG Draft, which is obsolete, and should redirect to the WG Note, once it's properly published. Maybe @iherman, @azaroth42, or @BigBlueHat remembers something about the publication history of this note. |
As an aside, I see that the permanent location of that note (https://www.w3.org/TR/json-ld-bp/ <https://www.w3.org/TR/json-ld-bp/>), which may not even be correct for a Note, is 404 not found, so the group needs to do something to address that. Also, the top result on Google is the old CG Draft <https://json-ld.org/spec/latest/json-ld-api-best-practices/>, which is obsolete, and should redirect to the WG Note, once it's properly published. Maybe @iherman <https://github.com/iherman>, @azaroth42 <https://github.com/azaroth42>, or @BigBlueHat <https://github.com/BigBlueHat> remembers something about the publication history of this note.
Per the [official list of publications](https://www.w3.org/groups/wg/json-ld/publications) this document was never published as a Working Group Note (although it was planned). I presume the group simply ran out of steam by the end.
The [editor's draft of the document](https://w3c.github.io/json-ld-bp/) does exist, but it should not refer to the /TR URLs (actually, it should not say WG Note either). The respec settings should be updated...
|
Hi apropos of this discussion, the OGC also needs to land on a way to offer and advertise different frames for the same object - for example many different possible ways of geometrically representing objects - points, polygons, 3D objects, 4D moving object tracks etc. This was a motivation behind work on dx-prof-conneg. Whilst this conversation is not terribly mature due to unfamiliarity with JSON-LD and tooling availability, the use of JSON-LD and framing in conjunction with OGC API (OpenAPI based) is being explored in innovation activities. A tool chain based on this in the RDFLib world has implemented https://www.w3.org/TR/dx-prof-conneg/ - what we lack is good JSON-LD serialisation tooling. A PR to update RDFLib to use the PyLD implementation of JSON-LD looks a promising way forward (see RDFLib/rdflib#1836) - IMHO this would gain some impetus with a couple of examples how to use context and frames in pyld. |
Very happy to have my team examine the frame link with profile-based conneg; let me know if we can help. |
The original person asking to be able to specify a frame as part of a request was @lisp, who may have done something based on the WG discussions. |
ps - I dont think JSON-LD needs profile negotiation - profiles (i.e. frames) need a URI and ideally a token, and ideally the URI resolve to a description using the PROF vocab in JSON-LD (with normal content negotiation :-) ) we need a BP described for this - but its not normative for JSON-LD itself IMHO. |
@RubenVerborgh @rob-metalinkage @lisp @gkellogg any news on this? w3c/json-ld-syntax#402 is a bit related |
i do not think it news. i have not seen use of the context link, but then, we are primarily concerned with generating ld+json for sparql responses, in which case the query already provides ample opportunity for aliasing and we do not incorporate a context (reference) in the response. there has been some interest in the latter but it seems perverse to send and reflect back to the client something which is, in that case, entirely a client matter. |
https://graphdb.ontotext.com/documentation/10.5/exporting-data.html#fetch-statements-from-repository and the next section state that in GraphDB 10.5 you can use :
Hopefully in GraphDB 10.6 (https://ontotext.atlassian.net/browse/GDB-10236) one will be able to use
|
#132 cites the text of two specs regarding
frame
andframed
profiles:https://www.w3.org/TR/json-ld11-framing/#iana-considerations:
https://w3c.github.io/json-ld-syntax/#application-ld-json
The third spec https://w3c.github.io/json-ld-api/, as far as I can see, does not specify where the
frame
andcontext
parameters come from in HTTP exchange.So it would be nice to give some examples on correct use of HTTP headers regarding the use of specific context and frame.
From what I could glean by googling (please comment whether that's correct!)
REQUEST
I1. To request a particular profile/context for jsonld,
according to https://www.rubydoc.info/gems/triannon#get-a-particular-anno:
I2. To request a particular context for "jsonld as json" (note:
type
pertains to the context document, not the payload document):I3. To request jsonld with a particular context and frame
RESPONSE
O1. jsonld as json with a particular context:
O2. jsonld that is framed and uses a particular context (the Links are redundant)
O3. jsonld that uses a particular context,
according to https://iiif.io/api/presentation/3.0/#63-responses:
Questions
profile
used to specify the kind of jsonld (egframed, compacted, expanded
),Link
headers as per I3, O2?1.0
or1.1
? The version may have significant performance impact, at least for Java-based repos, becausejsonld-java
(old) supports only 1.0 but is 4.6x faster thantitanium
(new) that supports 1.1: JSON-LD 1.1 support eclipse-rdf4j/rdf4j#3654The text was updated successfully, but these errors were encountered: