- From: James M Snell <jasnell@gmail.com>
- Date: Thu, 21 Aug 2014 13:36:15 -0700
- To: "activity-streams@googlegroups.com" <activity-streams@googlegroups.com>
- Cc: "public-socialweb@w3.org" <public-socialweb@w3.org>
On Thu, Aug 21, 2014 at 1:15 PM, Owen Shepherd <owen.shepherd@e43.eu> wrote:
[snip]
>>
>> Can you please give some concrete examples? I'll see if I can explain
>> the rationale for the changes using those examples.
>>
>
> I hope you will understand if I say this will take a bit of extra time to
> put together. I'll try to do so soonish :-)
>
+1
> One simple example, a video object in AS1 looks like
>
> {
> "objectType": "video",
> "displayName": "Cute little kittens",
> "embedCode": "<video width='320' height='240'
> controls='controls'>...</video>",
> "stream": {
> "url": "http://example.org/my_video.mpg"
> },
> "image": { "url": "http://example.com/my_video.mpg.jpg"},
> }
>
>
>
> Per your AS2 examples, this image would go from being a Media Link to an
> Object. Therefore, it would "decompose" into a separate object, and would
> require fetching from the database by processors.
How I would represent this in AS2 would be:
{
"objectType": "video",
"displayName": "Cute little kittens",
"content": "<video width='320' height='240'> controls='controls'>...</video>",
"id": "http://example.org/my_video.mpg",
"image": "http://example.com/my_video.jpg"
}
"image" is defined as a Link Value, which means it can be either an
IRI or an Object. The object form is only required if you wish to
define additional properties about the referenced resource.
>
> This object is not meaningful. It has no purpose on it's own, and no
> identifier. In other words, it is pointless it being an object; hence why I
> like the distinction between media links and objects, because they avoid
> such meaningless objects.
Unless you're specifying additional properties for the linked
resource, it shouldn't need to be expressed as a JSON object at all
(as in my example above).
- James
Received on Thursday, 21 August 2014 20:37:03 UTC