Re: Hosted JSON-LD context

On 10/07/2014 10:07 AM, Markus Lanthaler wrote:
> On 6 Okt 2014 at 23:36, James M Snell wrote:
>> Yep... that's a challenge with the JSON-LD mapping in this case.
>> Activity Streams 1.0 allows "verb" and "objectType" to be simple token
>> values like "post", or "person"... those don't expand out to URI's...
>> they are *just* tokens. The values of those fields can also be fully
>> qualified IRI's, however. There's no way to model that in JSON-LD
>> currently.
> 
> You could map it to a blank node as a workaround. Simply set "@vocab" to "_:" and type-coerce "verb" to "@vocab" in the context.

I think requiring IRI for "verb" and "objectType" can help with avoiding
issues with processing AS2.0 as RDF. Since objectType aliases @type, to
my understanding it automatically requires IRI anyways?

One could then always improvise with "urn:as:post" similar to
"urn:example:types:person" which currently AS2.0 spec uses in most examples.

Excerpts from example in JSON-LD Playground originally posted by James:
http://goo.gl/bY3p5j

Expanded
  "http://activitystrea.ms/2.0/verb": [
    {
      "@id": "_:post"
    }
  ]
Compacted
  "http://activitystrea.ms/2.0/verb": {
    "@id": "_:post"
  }
Flattened
  "http://activitystrea.ms/2.0/verb": {
    "@id": "_:b1"
  }
Framed
  "http://activitystrea.ms/2.0/verb": {
    "@id": "_:b1"
  }
N-Quads
  _:b0 <http://activitystrea.ms/2.0/verb> _:b1 .
Normalized
  _:c14n1 <http://activitystrea.ms/2.0/verb> _:c14n0 .

Received on Sunday, 12 October 2014 00:26:00 UTC