Re: Mediatypes that map to application/ld+json with a profile

2016-07-16 Thread Sarven Capadisli

On 2016-07-16 00:21, Ruben Verborgh wrote:

Hi Sarven, Phil, Rob,


Are there mediatypes that map to application/ld+json with a profile?


This begs the question why one would want to do that.


We're investigating to see what else is other than AS2 is making/stating 
such equivalences:


application/activity+json and application/ld+json; 
profile="http://www.w3.org/ns/activitystreams;


To the best of my know knowledge, there aren't any.

While I wholeheartedly appreciate the discussion on whether that's a 
good or bad idea, that wasn't at all my intention. [Aside: you are 
welcome to dig into past Social Web WG's discussions/meetings to see my 
strong position against the new mediatype.]


The investigation was towards Linked Data Notifications:

https://linkedresearch.org/ldn/

to see what it can mention in order to apply the robustness principle. 
It is a step towards helping people design flexible systems that wish to 
so they can be a bit more interoperable with other 
communities/implementations. That's being pragmatic.


LDN is not inventing or proposing a new mediatype, it doesn't have a 
need for it, nor there are any plans for it, neither promoting "non-LD 
stuff". Lastly, LDN has already marked this as at risk and prepared to 
hand it off to the Social Web Protocols. 
https://github.com/csarven/ldn/issues/10 already addressed all this, 
satisfied all commenters, and marked as closed:


* https://linkedresearch.org/ldn/#sending-activitystreams2-support
* https://linkedresearch.org/ldn/#consuming-activitystreams2-support

-Sarven
http://csarven.ca/#i



Re: Mediatypes that map to application/ld+json with a profile

2016-07-16 Thread Melvin Carvalho
On 16 July 2016 at 06:21, Ruben Verborgh  wrote:

> Hi Sarven, Phil, Rob,
>
> > Are there mediatypes that map to application/ld+json with a profile?
>
> This begs the question why one would want to do that.
>

This was investigated by the WG.  Over a period of time the pros and cons
were collected, and the cons firmly outweighed the pros:

https://www.w3.org/wiki/Socialwg/Media_type_for_AS2

However, there is a small but vocal contingent in the WG hostile to Linked
Data.  For example, one comment from the chair on this topic that was
unqualified was "JSON-LD is a non starter".

Ultimately this bespoke mime type got voted through IMHO against general
consensus, and common sense, and without looking at the evidence collected,
which is something that I mentioned in the minutes.

So we're stuck with a CR at the moment this is "sort of" linked data, but
not quite.  It's a real pain.

>
>
> The problem with specific MIME types is
> that they are only one-dimensional.
> What if multiple dimensions have to be considered?
> What if I want an activity represented in RDF,
> but not in JSON-LD? Do we need things like
> application/activity+turtle or +xml? That doesn't scale…
>
> Why would we want to have such specific media types
> when we already have media types for RDF syntaxes?
> After all, the whole idea of RDF data is that it is self-descriptive;
> that a client can understand that a document contains
> an activity / person / building by interpreting it.
> application/activity+json should be totally unnecessary.
>
> Note that there is currently no official interpretation of the + token,
> so a client cannot even assume application/xxx+json is a JSON(-LD)
> document.
> Clients have to he hard-coded for application/activity+json.
> This defeats much of the purpose of RDF.
>
> >> Format/serialisation/Mime Type, whatever, is not enough. You need to
> >> know the profile. Erik Wilde has an internet draft on this [1] too.
>
> I definitely think profiles are the way to go.
>
> >> Should we also consider it as another dimension of content negotiation?
>
>
> Definitely. That's the only use case I see for
> application/activity+json-ish things,
> telling a server that you expect a certain vocabulary / profile.
> So I'd expect a client to say
> Accept: text/turtle;profile="http://example.org/activity;
> instead.
>
> >>> The Web Annotation WG decided /not/ to do this, and to only use a
> profile.  So the media type for the JSON-LD annotation serialization is:
>  application/ld+json;profile="http://www.w3.org/ns/anno.jsonld;
>
> I love it; that's the most scalable way to do this,
> and it does justice to what RDF stands for:
> the interpretation is inside of the message.
>
> How is it actually implemented?
> It should be sufficient that the client does
> Accept: application/ld+json;profile="http://www.w3.org/ns/anno.jsonld;
> and the server only says
> Content-Type: application/ld+json
> since the rest would be in the message.
>
> Actually, the client should also be able to say
> Accept: text/turtle;profile="http://www.w3.org/ns/anno.jsonld;
> to which the server would reply with
> Content-Type: text/turtle
> but I guess the notion of "profile" (RFC 6906)
> here is to be interpreted more strictly as "JSON-LD profile".
> I would be interesting to consider
> Accept: application/ld+json;profile="http://www.w3.org/ns/anno;
> without any extension, allowing content negotiation on the profile.
>
> Best,
>
> Ruben
>
> PS Wrote more about that here:
> – http://ruben.verborgh.org/phd/ruben-verborgh-phd.pdf#page=103
> – http://ruben.verborgh.org/blog/2015/10/06/turtles-all-the-way-down/
>


Re: Mediatypes that map to application/ld+json with a profile

2016-07-15 Thread Ruben Verborgh
Hi Sarven, Phil, Rob,

> Are there mediatypes that map to application/ld+json with a profile? 

This begs the question why one would want to do that.

The problem with specific MIME types is
that they are only one-dimensional.
What if multiple dimensions have to be considered?
What if I want an activity represented in RDF,
but not in JSON-LD? Do we need things like
application/activity+turtle or +xml? That doesn't scale…

Why would we want to have such specific media types
when we already have media types for RDF syntaxes?
After all, the whole idea of RDF data is that it is self-descriptive;
that a client can understand that a document contains
an activity / person / building by interpreting it.
application/activity+json should be totally unnecessary.

Note that there is currently no official interpretation of the + token,
so a client cannot even assume application/xxx+json is a JSON(-LD) document.
Clients have to he hard-coded for application/activity+json.
This defeats much of the purpose of RDF.

>> Format/serialisation/Mime Type, whatever, is not enough. You need to 
>> know the profile. Erik Wilde has an internet draft on this [1] too.

I definitely think profiles are the way to go.

>> Should we also consider it as another dimension of content negotiation? 


Definitely. That's the only use case I see for application/activity+json-ish 
things,
telling a server that you expect a certain vocabulary / profile.
So I'd expect a client to say
Accept: text/turtle;profile="http://example.org/activity;
instead.

>>> The Web Annotation WG decided /not/ to do this, and to only use a profile.  
>>> So the media type for the JSON-LD annotation serialization is:   
>>> application/ld+json;profile="http://www.w3.org/ns/anno.jsonld;

I love it; that's the most scalable way to do this,
and it does justice to what RDF stands for:
the interpretation is inside of the message.

How is it actually implemented?
It should be sufficient that the client does
Accept: application/ld+json;profile="http://www.w3.org/ns/anno.jsonld;
and the server only says
Content-Type: application/ld+json
since the rest would be in the message.

Actually, the client should also be able to say
Accept: text/turtle;profile="http://www.w3.org/ns/anno.jsonld;
to which the server would reply with
Content-Type: text/turtle
but I guess the notion of "profile" (RFC 6906)
here is to be interpreted more strictly as "JSON-LD profile".
I would be interesting to consider
Accept: application/ld+json;profile="http://www.w3.org/ns/anno;
without any extension, allowing content negotiation on the profile.

Best,

Ruben

PS Wrote more about that here:
– http://ruben.verborgh.org/phd/ruben-verborgh-phd.pdf#page=103
– http://ruben.verborgh.org/blog/2015/10/06/turtles-all-the-way-down/


Re: Mediatypes that map to application/ld+json with a profile

2016-07-15 Thread Phil Archer

Hi Sarven,

I need to be *very* careful how I say this or I am going to get so much 
flak for promoting a workshop on this list ;-), but I can't help but 
point out that this topic is very much in scope of

https://www.w3.org/2016/11/sdsvoc/

Format/serialisation/Mime Type, whatever, is not enough. You need to 
know the profile. Erik Wilde has an internet draft on this [1] too.


That approach - using HTTP Linked Headers is probably the simplest. 
Should we also consider it as another dimension of content negotiation? 
For example, I might ask a catalogue for metadata about a given dataset 
using DCAT-AP, or DDI and that's independent of whether it's in JSON, 
Turtle or whatever.


Actually, I really do have to send out a CfP for that workshop, which I 
will do, but not here, or I'll have to remonstrate with myself from now 
until next year.


Phil.

[1] https://www.ietf.org/rfc/rfc6906.txt

On 15/07/2016 15:16, Sarven Capadisli wrote:

On 2016-07-15 09:44, Ghislain Atemezing wrote:

Are there mediatypes that map to application/ld+json with a profile?
Only aware of application/activity+json


Not happy with this content here https://www.w3.org/ns/formats/ ?
Specially this line https://www.w3.org/ns/formats/data/JSON-LD ?


Thanks Ghislain.

I meant the equivalences that can be made between JSON conventions and
JSON-LD.

Is there anything out there that's treating a JSON mediatype with
application/ld+json + profile?

e.g., application/ld+json;
profile="http://www.w3.org/ns/activitystreams; and
application/activity+json is one of those as far as I know.

Also raised this in GeoJSON-LD since GeoJSON uses application/geo+json:
https://github.com/geojson/geojson-ld/issues/41

If any, what else is out there?

-Sarven
http://csarven.ca/#i




--


Phil Archer
W3C Data Activity Lead
http://www.w3.org/2013/data/

http://philarcher.org
+44 (0)7887 767755
@philarcher1



Re: Mediatypes that map to application/ld+json with a profile

2016-07-15 Thread Sarven Capadisli

On 2016-07-15 09:44, Ghislain Atemezing wrote:

Are there mediatypes that map to application/ld+json with a profile?
Only aware of application/activity+json


Not happy with this content here https://www.w3.org/ns/formats/ ?
Specially this line https://www.w3.org/ns/formats/data/JSON-LD ?


Thanks Ghislain.

I meant the equivalences that can be made between JSON conventions and 
JSON-LD.


Is there anything out there that's treating a JSON mediatype with 
application/ld+json + profile?


e.g., application/ld+json; 
profile="http://www.w3.org/ns/activitystreams; and 
application/activity+json is one of those as far as I know.


Also raised this in GeoJSON-LD since GeoJSON uses application/geo+json:
https://github.com/geojson/geojson-ld/issues/41

If any, what else is out there?

-Sarven
http://csarven.ca/#i



Re: Mediatypes that map to application/ld+json with a profile

2016-07-15 Thread Ghislain Atemezing
Dear great Sarven ;)
> 
> Dear LazySW,
> 
> Are there mediatypes that map to application/ld+json with a profile? Only 
> aware of application/activity+json

Not happy with this content here https://www.w3.org/ns/formats/ 
 ? 
Specially this line https://www.w3.org/ns/formats/data/JSON-LD 
 ?

HTH

Ghislain 


Ghislain A. Atemezing, Ph.D 
R Engineer
@ Mondeca, Paris, France
Labs: http://labs.mondeca.com  
Tel: +33 (0)1 4111 3034
Web: www.mondeca.com 
Twitter: @gatemezing
About Me:  https://w3id.org/people/gatemezing 















Mediatypes that map to application/ld+json with a profile

2016-07-15 Thread Sarven Capadisli

Dear LazySW,

Are there mediatypes that map to application/ld+json with a profile? 
Only aware of application/activity+json


-Sarven
http://csarven.ca/#i