Content-type for JSON Activity Streams

252 views
Skip to first unread message

Sandeep Shetty

unread,
Oct 5, 2012, 6:21:22 PM10/5/12
to activity...@googlegroups.com
Is there a recommendation for the content-type to use for a JSON
Activity Streams Payload?

--
Sandeep Shetty
Founder, Simpthings
http://simpthings.com/
http://sandeep.shetty.in/p/about.html

Melvin Carvalho

unread,
Oct 7, 2012, 12:47:03 AM10/7/12
to activity...@googlegroups.com
On 6 October 2012 00:21, Sandeep Shetty <sandeep...@gmail.com> wrote:
Is there a recommendation for the content-type to use for a JSON
Activity Streams Payload?

It would probably be beneficial for AS to have it's own content type as it gets to maturity.  The tent.io protocol, for example, have done this quite effectively, as have JSON LD

Advantages:

- Non disruptive, if not supplied you should get back the same thing
- Clients and servers will know what they are getting
- Ability to route requests efficiently with mod rewrite
- Non collisions with future formats
 

--
Sandeep Shetty
Founder, Simpthings
http://simpthings.com/
http://sandeep.shetty.in/p/about.html

--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To post to this group, send email to activity...@googlegroups.com.
To unsubscribe from this group, send email to activity-strea...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activity-streams?hl=en.


Evan Prodromou

unread,
Oct 7, 2012, 11:10:38 PM10/7/12
to activity...@googlegroups.com
application/stream+json was suggested in a previous thread; we should probably get around to registering it.

-Evan

James M Snell

unread,
Oct 8, 2012, 10:16:25 AM10/8/12
to activity...@googlegroups.com

I can take that todo. I'll write up a draft requesting registration.

--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activity-streams/-/wrO6JcbKFdcJ.

Sandeep Shetty

unread,
Oct 7, 2012, 3:43:10 PM10/7/12
to activity...@googlegroups.com
Does application/activitystream+json seem reasonable?

Sandeep Shetty

unread,
Oct 7, 2012, 4:18:20 PM10/7/12
to activity...@googlegroups.com
The Flattr API seems to be using application/stream+json:
http://developers.flattr.net/api/#response-formats

which it says is defined in http://activitystrea.ms/specs/json/1.0/

but I can't seem to find a reference to it in the spec.

--
Sandeep Shetty
Founder, Simpthings
http://simpthings.com/
http://sandeep.shetty.in/p/about.html

James M Snell

unread,
Oct 8, 2012, 8:22:42 PM10/8/12
to activity...@googlegroups.com
Step 1.. http://www.ietf.org/id/draft-snell-activity-streams-type-00.txt

Please review and comment. Once we're ok with it, I'll submit it for review by the IETF media-types folks.

- James

--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.

Jeff Martin

unread,
Oct 9, 2012, 11:20:03 AM10/9/12
to activity...@googlegroups.com
+1 from me

Melvin Carvalho

unread,
Oct 9, 2012, 11:29:48 AM10/9/12
to activity...@googlegroups.com
On 9 October 2012 02:22, James M Snell <jas...@gmail.com> wrote:
Step 1.. http://www.ietf.org/id/draft-snell-activity-streams-type-00.txt

Please review and comment. Once we're ok with it, I'll submit it for review by the IETF media-types folks.

Great job. This is an awesome example of agile spec development.
 

Sandeep Shetty

unread,
Oct 9, 2012, 4:56:02 PM10/9/12
to activity...@googlegroups.com
Glad this got sorted :) I've gone ahead and used
application/stream+json for Activity Pingback:
http://pingback.converspace.com/

--
Sandeep Shetty
Founder, Simpthings
http://simpthings.com/
http://sandeep.shetty.in/p/about.html


James M Snell

unread,
Oct 9, 2012, 5:07:55 PM10/9/12
to activity...@googlegroups.com
Unfortunately it's not entirely sorted yet. We may decide that application/stream+json works for us, but the IETF media types bunch are a prickly crotchety bunch... we can go ahead and use application/stream+json because I don't anticipate any issues, but you never really know with those people. :-)

James M Snell

unread,
Oct 11, 2012, 12:34:02 PM10/11/12
to activity...@googlegroups.com
quick editorial iteration.. http://www.ietf.org/id/draft-snell-activity-streams-type-01.txt

Submitting this to the ietf-types wg today for consideration.

- James

Laurent-Walter Goix

unread,
Jan 21, 2013, 12:58:54 PM1/21/13
to activity...@googlegroups.com
Hello James did you get some feedback from ietf folks on this?

James M Snell

unread,
Jan 22, 2013, 12:55:43 AM1/22/13
to activity...@googlegroups.com
The I-D has been submitted and received minimal feedback. I have asked the Area Director to move it along as an independent submission on the Informational track.. this ought to get it registered fairly quickly but there's no telling exactly what the timeline will be. I'll check in with the AD tomorrow on it.


On Mon, Jan 21, 2013 at 9:58 AM, Laurent-Walter Goix <laurentwa...@gmail.com> wrote:
Hello James did you get some feedback from ietf folks on this?
--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activity-streams/-/U0X0XM9h5m4J.

Abhishek Kumar

unread,
Feb 19, 2013, 6:30:11 PM2/19/13
to activity...@googlegroups.com
Any recommendations on how to represent the activity of a user updating his profile attributes?

For eg:
The User has following attributes:

id
firstName
lastName

So, if a user-a updates his firstName, how should the activity looks like?

actor: user-a
verb: update
object: user-a ?

We seem to loose the information on what has been updated.

Any guidance would be much appreciated.

Thanks
-Abhishek

Chris Messina

unread,
Feb 19, 2013, 9:06:36 PM2/19/13
to activity...@googlegroups.com, activity...@googlegroups.com

Seems like you need a custom object type of "profile". You could then specify what was changed using vCard or PortableContacts schema. 


Sent from Mailbox for iPhone


--
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.


Abhishek Kumar

unread,
Feb 20, 2013, 11:58:16 PM2/20/13
to activity...@googlegroups.com
Chris,

Thanks for your response. If I understand what you are saying, then my activity will looks like
actor: user-a
verb: update
object: user-a-profile

Now the activity processor should make a call to retrieve user-a-profile resource which is in vCard or PortableContacts schema. I read the PortableContacts spec, but couldn't figure out how to fetch updated fields only.

Also, I was hoping to have the activity itself express what was updated and not make additional calls. Ofcourse, a custom property in user-profile resource can tell what was updated but wanted to understand if there's a standard way of doing this.

Did you have something else in mind.

Best Regards
-Abhishek

Chris Messina

unread,
Feb 21, 2013, 1:37:16 AM2/21/13
to activity...@googlegroups.com, activity...@googlegroups.com

Yeah, I'm suggesting that you embed to updated contact fields in the object itself. Especially if you're dealing with JSON, you should be able to express those attributes if the profile. 


I mean, the challenge is getting anyone else to support / consume that kind of activity, but if you're just doing stuff internally, or are building an API, just document it clearly. ActivityStreams is much more a framework for expressing activities than a prescriptive format for all possible activities! Make it work for your needs; just document what you do and share back your approach on this list!

Sent from Mailbox for iPhone


Abhishek Kumar

unread,
Feb 21, 2013, 8:09:51 PM2/21/13
to activity...@googlegroups.com
Thanks! Will do.

-Abhishek
Reply all
Reply to author
Forward
0 new messages