activitystreams.jsonld

67 views
Skip to first unread message

Owen Shepherd

unread,
Apr 30, 2014, 1:24:02 PM4/30/14
to activity...@googlegroups.com
{"actor":{"displayName": "Owen Shepherd"}, "verb": "like", "object": {"url": "https://github.com/jasnell/activitystreams.jsonld"}}

Two comments:
  • It maps all keys to RDF entities in namespace http://activitystrea.ms/2.0/. Wisdom is that RDF namespaces should not be versioned - they should be forever. It's basically impossible to change an RDF namespace without all hell breaking loose.

    This should probably just be http://activitystrea.ms/?

  • A while back I started drafting up an RDF OWL schema for ActivityStreams. Should I revive that?

    What we would then have is an RDF schema which defines ActivityStreams in RDF form, and a JSON-LD schema which translated that to "normal" JSON. From that, the ActivityStreams JSON 2.0 spec would be a profile of JSON-LD - a subset, with an implied context. application/activitystreams+json would imply that you could either parse the file as raw JSON or using a JSON-LD parser into a triple store

James M Snell

unread,
Apr 30, 2014, 3:33:41 PM4/30/14
to activity...@googlegroups.com
On Wed, Apr 30, 2014 at 10:24 AM, Owen Shepherd <owen.s...@e43.eu> wrote:
> See https://github.com/jasnell/activitystreams.jsonld
>
> {"actor":{"displayName": "Owen Shepherd"}, "verb": "like", "object": {"url":
> "https://github.com/jasnell/activitystreams.jsonld"}}
>
> Two comments:
>
> It maps all keys to RDF entities in namespace http://activitystrea.ms/2.0/.
> Wisdom is that RDF namespaces should not be versioned - they should be
> forever. It's basically impossible to change an RDF namespace without all
> hell breaking loose.
>
> This should probably just be http://activitystrea.ms/?
>

Considered that, however, the Activity Streams 2.0 model is definitely
distinct from 1.0. There are a number of important differences that
could get lost.

> A while back I started drafting up an RDF OWL schema for ActivityStreams.
> Should I revive that?
>
> What we would then have is an RDF schema which defines ActivityStreams in
> RDF form, and a JSON-LD schema which translated that to "normal" JSON. From
> that, the ActivityStreams JSON 2.0 spec would be a profile of JSON-LD - a
> subset, with an implied context. application/activitystreams+json would
> imply that you could either parse the file as raw JSON or using a JSON-LD
> parser into a triple store
>

I think this is worthwhile, but the bit I need to be most careful of
is maintaining backwards compatibility with Activity Streams 1.0.
Things like the "objectType" property do not map cleanly to the
equivalent JSON-LD "@type", for instance, and it's not clear how
things like AS 2.0 Type Values would need to be handled.

- James

>
> Owen Shepherd
> http://owenshepherd.net | owen.s...@e43.eu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Activity Streams" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to activity-strea...@googlegroups.com.
> To post to this group, send email to activity...@googlegroups.com.
> Visit this group at http://groups.google.com/group/activity-streams.
> For more options, visit https://groups.google.com/d/optout.

Owen Shepherd

unread,
Apr 30, 2014, 7:30:30 PM4/30/14
to activity...@googlegroups.com
On 30 April 2014 20:33, James M Snell <jas...@gmail.com> wrote:
On Wed, Apr 30, 2014 at 10:24 AM, Owen Shepherd <owen.s...@e43.eu> wrote:
> See https://github.com/jasnell/activitystreams.jsonld
>
> {"actor":{"displayName": "Owen Shepherd"}, "verb": "like", "object": {"url":
> "https://github.com/jasnell/activitystreams.jsonld"}}
>
> Two comments:
>
> It maps all keys to RDF entities in namespace http://activitystrea.ms/2.0/.
> Wisdom is that RDF namespaces should not be versioned - they should be
> forever. It's basically impossible to change an RDF namespace without all
> hell breaking loose.
>
> This should probably just be http://activitystrea.ms/?
>

Considered that, however, the Activity Streams 2.0 model is definitely
distinct from 1.0. There are a number of important differences that
could get lost.

There is no ActivityStreams 1.0 RDF model, so moot point
 

> A while back I started drafting up an RDF OWL schema for ActivityStreams.
> Should I revive that?
>
> What we would then have is an RDF schema which defines ActivityStreams in
> RDF form, and a JSON-LD schema which translated that to "normal" JSON. From
> that, the ActivityStreams JSON 2.0 spec would be a profile of JSON-LD - a
> subset, with an implied context. application/activitystreams+json would
> imply that you could either parse the file as raw JSON or using a JSON-LD
> parser into a triple store
>

I think this is worthwhile, but the bit I need to be most careful of
is maintaining backwards compatibility with Activity Streams 1.0.
Things like the "objectType" property do not map cleanly to the
equivalent JSON-LD "@type", for instance, and it's not clear how
things like AS 2.0 Type Values would need to be handled.

- James

 

Can we not just put the type definitions in the default namespace? Lowercase types aren't RDFy, but are livable.

Surely

{
...
"type": {
    "id": "http://example.com/aType"
},
...
}

Should "just work" in JSON-LD? The RDF triple implications are obvious.

(One thing I'm not sure of: Does JSON-LD allow RDF type implciations in contexts? E.G. in an RDF schema you can say that something posessing the "actor" type is an as:activity

Markus Lanthaler

unread,
May 2, 2014, 11:49:07 AM5/2/14
to activity...@googlegroups.com
On Wednesday, April 30, 2014 9:34 PM, James M Snell wrote:
> > A while back I started drafting up an RDF OWL schema for ActivityStreams.
> > Should I revive that?
> >
> > What we would then have is an RDF schema which defines ActivityStreams in
> > RDF form, and a JSON-LD schema which translated that to "normal" JSON. From
> > that, the ActivityStreams JSON 2.0 spec would be a profile of JSON-LD - a
> > subset, with an implied context. application/activitystreams+json would
> > imply that you could either parse the file as raw JSON or using a JSON-LD
> > parser into a triple store
> >
>
> I think this is worthwhile

I while ago I've also created (and shared with this group) a JSON-LD context and a ActivityStreams vocabulary:

https://github.com/lanthaler/json-activity

Take whatever you need or file a PR and I'll merge it.


HTH,
Markus


--
Markus Lanthaler
@markuslanthaler



James M Snell

unread,
May 2, 2014, 1:44:25 PM5/2/14
to activity...@googlegroups.com

Thank you. Much appreciated. Merging effort would be good, I think.

Reply all
Reply to author
Forward
0 new messages