Re: Re: ODP: ODP: Re: Replace hydra:Error with application/problem+json

This seems to be cleanest solutuon. 
The thing is that with JSON-LD context added we're outside of the spec for 'problem'. Context will map 'standard' problem description to RDF compliant statements but this mapping will use an IRIs from a vocabulary that is outside this spec. 
Unless Mr. Nottingham rerwites his spec to RDF and give an effectively an onology/simple RDFS vocab with an IRI we can use whatever we want in Hydra. Only condition is to have a 1 to 1 terms map.

Best

Karol Szczepański

<div>-------- Oryginalna wiadomość --------</div><div>Od: John Walker <john.walker@semaku.com> </div><div>Data:28.09.2015  13:43  (GMT+01:00) </div><div>Do: Asbjørn Ulsberg <asbjornu@gmail.com>, Karol Szczepański <karol.szczepanski@gmail.com> </div><div>DW: public-hydra@w3.org, Dietrich Schulten <ds@escalon.de> </div><div>Temat: Re: ODP: ODP: Re: Replace hydra:Error with application/problem+json </div><div>
</div>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 19:21:31 UTC