>Such as?
> For AS1, these are:
>
> obj["links"]["self"]["href"] || obj["id"]
> obj["url"] (unless it's a collection, in which case you're screwed -
> SPECBUG!)
> obj[type]["url"]
>
> As much as I appreciate simplifying the spec, we should make sure that use
> of the spec remains simple. I am not convinced that this is the case for
> some of the changes in AS2
>
> ---Can you please give some concrete examples? I'll see if I can explain
>
> As a side note: I'm not a fan of the way that AS2 seems to be causing
> unnamed Objects to proliferate where in AS1 Media Links would have been
> used. We should remember the distinction between objects - things which form
> the vertices of a graph (or, which on a website would have distinct web
> pages) and the embedded content thereof - what AS1 called media links.
>
> This is very important to the many applications and clients which place the
> objects as distinct entries in a database, because this proliferation of
> objects makes their lives so much harder.
>
the rationale for the changes using those examples.
{ "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"}, }
21 August 2014 21:36
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
obj["links"]["self"]["href"] || obj["id"]
obj["url"] *(unless it's a collection, in which case you're screwed - SPECBUG!)
obj[*type*]["url"]
This is semantic purity at the expense of clarity and utility.
When deriving the original Activity Streams properties, we reviewed the published formats that we were attempting to unify, and found url in most of them.
If we are going to consider breaking changes, we should redo that review, and document it more clearly this time, rather than reasoning from other sparsely implemented specs.