Re: [AS2] Deprecate "url" in favor of "id" and "self" link relations

Activity Streams 2.0 already has an "id" property that is mapped to
the JSON-LD "@id". While this property is required to be an absolute
IRI, it is not always dereferenceable and for backwards compatibility,
we cannot necessary declare that it must be. For most cases, however,
using "id" will be sufficient.

For instance,

  {
    "objectType": "image",
    "url": "http://example.org/foo.jpg"
  }

Would become,

  {
    "objectType": "image",
    "id": "http://example.org/foo.jpg"
  }

Which just works. When we apply the JSON-LD context, that maps to:

  {
    "@type": "image",
    "@id": "http://example.org/foo.jpg"
  }

However, in cases where id is not dereferenceable, such as:

  {
    "objectType": "person",
    "id": "urn:example:person:123456",
    "url": "http://example.org/~joe"
  }

We'd use something like:

  {
    "objectType": "person",
    "id": "urn:example:person:123456",
    "self": "http://example.org/~joe"
  }

(a more specific link relation like "profile" would work well in this
example also... instead of "self").

The point is that AS1 has always made a distinction between the static
never-changing identifier (id) and the reference to a displayable page
about the object (url).  In cases where those are one and the same, id
works just fine.

- James

On Thu, Aug 21, 2014 at 11:24 AM, Erik Wilde <dret@berkeley.edu> wrote:
> On 2014-08-21, 11:13 , Andreas Kuckartz wrote:
>>
>> We already briefly discussed this on GitHub, but why can't we replace
>> "url" by "@id" instead of "self" ?
>> https://github.com/jasnell/w3c-socialwg-activitystreams/issues/5
>> "@id" is the property specified by JSON-LD for such purposes.
>
>
> very good point, and this should be part of the bigger (and very necessary)
> discussion how to either adopt JSON-LD, or not. to me (and others, i
> assume), the current approach of "we're kind of doing JSON-LD, but not
> really" is not very helpful. if AS is using JSON-LD, it should be using it
> right, and then andreas' suggestion (and other alignments that would need to
> be made) probably are good starting points.
>
> cheers,
>
> dret.
>
> --
> erik wilde | mailto:dret@berkeley.edu  -  tel:+1-510-2061079 |
>            | UC Berkeley  -  School of Information (ISchool) |
>            | http://dret.net/netdret http://twitter.com/dret |
>

Received on Thursday, 21 August 2014 18:35:45 UTC