Comments in JSON

28 views
Skip to first unread message

Bill Christian

unread,
Jun 6, 2013, 11:04:21 AM6/6/13
to activity...@googlegroups.com
I've read some of the past threads on the implicit or explicit typing of a comment object type. However, not much has been mentioned recently. Was a consensus decided on how to associate a comment to a pre-published activity? Specifically, I am looking how to represent this in a JSON formatted activity. I am additionally curious if the discussion on 2.0 has changed the community's opinion on how to associate comments.


James M Snell

unread,
Jun 6, 2013, 11:30:53 AM6/6/13
to activity...@googlegroups.com
The Replies spec [1] describes the current state of the art on this.
Any object can contain the "inReplyTo" property whose value (in 1.0)
is an array of objects being replied to. In my 2.0 draft, this is
updated to be a Link value (so it can be an IRI, object or array of
objects). Likewise, any object can contain a "replies" property whose
value is a Collection object listing known replies.

[1] http://activitystrea.ms/specs/json/replies/1.0/

So.. to give a slightly over-verbose example...

In 1.0...
{
"objectType": "article",
"id": "urn:example:articles:1",
"title": "My Article",
...,
"replies": {
"items": [
{
"objectType": "note",
"content": "Nice article",
"inReplyTo": [
{
"objectType": "article",
"id": "urn:example:articles:1"
}
]
}
]
}
}

In the proposed 2.0...
{
"type": "article",
"id": "urn:example:articles:1",
"title": "My Article",
...,
"replies": {
"items": [
{
"type": "note",
"content": "Nice article",
"inReplyTo": "urn:example:articles:1"
}
]
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Evan Prodromou

unread,
Jun 9, 2013, 4:24:44 PM6/9/13
to activity...@googlegroups.com


On Thursday, June 6, 2013 11:30:53 AM UTC-4, James M Snell wrote:

In 1.0...
 
In the proposed 2.0...

ಠ_ಠ



James M Snell

unread,
Jun 9, 2013, 5:06:30 PM6/9/13
to activity...@googlegroups.com
Evan,

The face is cute, but more concrete feedback on the current 2.0 draft
would be more helpful.

On Sun, Jun 9, 2013 at 1:24 PM, Evan Prodromou <evan.pr...@gmail.com> wrote:
>[snip]
>
> ಠ_ಠ
>
>

Evan Prodromou

unread,
Jun 9, 2013, 5:27:14 PM6/9/13
to activity...@googlegroups.com
Oh, sorry, did I say that out loud?

It was an example of one of my concerns -- that starting the 2.0 process is going to cause a problem for AS uptake.

If you say, "In 1.0 it works this way, and in 2.0 it works that way," then the implementer has to choose.

I think it's one of the worst kind of choices to have to make as a developer, too: do I use the tried-and-true but fading Old Version, or the newfangled but probably dangerous New Version?

Thus the Look of Disapproval.

-Evan

Melvin Carvalho

unread,
Jun 9, 2013, 7:28:11 PM6/9/13
to activity-streams
On 9 June 2013 23:27, Evan Prodromou <evan.pr...@gmail.com> wrote:
Oh, sorry, did I say that out loud?

It was an example of one of my concerns -- that starting the 2.0 process is going to cause a problem for AS uptake.

If you say, "In 1.0 it works this way, and in 2.0 it works that way," then the implementer has to choose.

I think it's one of the worst kind of choices to have to make as a developer, too: do I use the tried-and-true but fading Old Version, or the newfangled but probably dangerous New Version?

Thus the Look of Disapproval.

This is a valid concern, imho, especially given the points that Chris has made.  The flip side, is that I think this could also increase uptake of AS overall, and bring new people, architects/developers/implementors into the eco system.

One thought, perhaps a separate, mailing list for AS 2.0?
 

-Evan


On Sunday, June 9, 2013 5:06:30 PM UTC-4, James M Snell wrote:
Evan,

The face is cute, but more concrete feedback on the current 2.0 draft
would be more helpful.

On Sun, Jun 9, 2013 at 1:24 PM, Evan Prodromou <evan.pr...@gmail.com> wrote:
>[snip]
>
> ಠ_ಠ
>
>

--
Reply all
Reply to author
Forward
0 new messages