- From: Dietrich Schulten <ds@escalon.de>
- Date: Mon, 28 Sep 2015 19:30:46 +0200
- To: Asbjørn Ulsberg <asbjornu@gmail.com>
- Cc: Hydra <public-hydra@w3.org>, karol.szczepanski@gmail.com, John Walker <john.walker@semaku.com>
- Message-ID: <46c0f661-ecd5-4ac8-923f-e16aeaa01780@escalon.de>>
Hi, Comments inline. Am 28.09.2015 13:46 schrieb Asbjørn Ulsberg <asbjornu@gmail.com>: > > Yes, that’s fine. I just don’t see the need to explain to anyone that application/problem+json is based on JSON-LD if the spec is rewritten to be based on JSON-LD. In that case, it will be a given just due to its content type (and the RFC explaining the fact). A json-ld file is json with a linked-data context. Without a context, the problem+json attributes are invisible to a json-ld processor. That is by specification, "JSON keys that do not expand to an IRI, (...) are not Linked Data and thus ignored when processed." The context can be linked in via a Link header or it can be embedded with @context, in which case the media type *must* be application/ld+json, otherwise the semantics of @context is undefined. In problem+json there is no @context attribute, and there is no RDF vocab yet which defines its attributes. > So, yes, we can always bridge the gap between the current spec and JSON-LD, but is that necessary? Is anything lost if application/problem+json is rewritten so it is JSON-LD compatible out of the box? What do you have in mind when you say "rewrite so it is compatible"? Trouble is that the problem+json attribute semantics has not yet been published in a way that can be mapped to RDF by a machine. There is a relax-ng schema, but unlike xml schema with id attributes, relax-ng cannot be re-used for RDF (afaik). Just stating that the rfc is also an RDF vocabulary is not sufficient, it must be published and the json-ld response must point to it somehow. The media types ld+json and problem+json are mutually exclusive, I am afraid there is no third way. > > -- > Asbjørn Ulsberg -=|=- asbjorn@ulsberg.no > «He's a loathsome offensive brute, yet I can't look away» > > > On Mon, Sep 28, 2015 at 1:43 PM, John Walker <john.walker@semaku.com> wrote: >> >> Hi Asbjørn, >> >>> >>> On September 27, 2015 at 11:37 PM Asbjørn Ulsberg <asbjornu@gmail.com> wrote: >>> >>> Why do we need both? Can’t application/problem+json be JSON-LD compatible without announcing it in its Content-Type? Or is it expected that everything that is JSON-LD compatible will use application/ld+json as its content type? >> >> You can just add a Link header to the response to reference to the context that can be used to interpret an ordinary JSON documents as JSON-LD. >> >> You can find more info abotu this in the JSON-LD rec: >> >> http://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld >> >> Regards, >> >> John >>> >>> -- >>> Asbjørn Ulsberg -=|=- asbjorn@ulsberg.no >>> «He's a loathsome offensive brute, yet I can't look away» >>> >>> >>> On Sun, Sep 27, 2015 at 9:38 PM, Karol Szczepański <karol.szczepanski@gmail.com> wrote: >>>> >>>> OK, I see your point now. >>>> >>>> Server may take into account accepted media types client sent and choose between RDF (if applicable) or not. It still may ignore it and consider a response as a subject not for content negotation and come with bare ‘problem’ media type. >>>> >>>> >>>> >>>> >>>> >>>> Regards >>>> >>>> >>>> >>>> >>>> >>>> Karol Szczepański >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Od: Dietrich Schulten >>>> Wysłano: niedziela, 27 września 2015 15:38 >>>> Do: public-hydra@w3.org >>>> Temat: Re: ODP: Re: Replace hydra:Error with application/problem+json >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Hi Karol, >>>> >>>> >>>> >>>> >>>> >>>> that was a misunderstanding. >>>> >>>> >>>> >>>> >>>> >>>> Am 27.09.2015 um 13:56 schrieb Karol Szczepański: >>>> >>>> > Hi >>>> >>>> > >>>> >>>> > Your approach would put non-RDF clients to problem as you suggest to >>>> >>>> > respond with application/ld+json instead of application/problem+json. >>>> >>>> >>>> >>>> >>>> >>>> That was not my intention at all. >>>> >>>> The idea is: *If* a client says in its POST that it accepts >>>> >>>> application/ld+json, then the service might respond with >>>> >>>> >>>> >>>> >>>> >>>> Content-Type: application/ld+json >>>> >>>> >>>> >>>> >>>> >>>> If another client comes to the same service and accepts >>>> >>>> application/json, then the server might respond with >>>> >>>> application/problem+json, similarly for XML. >>>> >>>> >>>> >>>> >>>> >>>> The rules of conneg apply, of course. The server may respond whatever it >>>> >>>> wants to. >>>> >>>> >>>> >>>> >>>> >>>> Best, >>>> >>>> Dietrich >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >> >> >> > >
Received on Monday, 28 September 2015 17:31:18 UTC