Atom for JSON?

2022 views
Skip to first unread message

yojava

unread,
Jun 22, 2011, 1:57:07 PM6/22/11
to restful-json
Hi,
Is anyone interested in a lightweight JSON microformat/schema for
Atom? Existing formats (such as Google Data Protocol) have a lot of
XML baggage and don't really play to the strengths of JSON (simple,
lightweight and readable).

The use case i have in mind is syndicating content to mobile HTML+JS
apps. I've created some examples of a format that i think DOES play to
the strengths of JSON
http://www.gridfrog.com/atomjs/

A few things to note:

1. In addition to Atom, the structure borrows from MRSS and OpenSearch

2. Atom allows for several content types. To keep the json structure
simple i've assumed a type of "xhtml". This makes sense for HTML+JS
apps.

3. Because this is JSON, XHTML content can be a fragment (without a
parent node).

4. Atom supports many types of link but the most important seem to be
rel="self" and rel="alternate". I think the 80/20 rule applies so i've
promoted them to first class citizens. More detail here
http://yojava.wordpress.com/2011/06/12/atom-on-json/

A microformat would increase portability of HTML+JS feeds, apps and
services.

Does anyone have an opinion on this?

Tatu Saloranta

unread,
Jun 22, 2011, 3:21:26 PM6/22/11
to restfu...@googlegroups.com
On Wed, Jun 22, 2011 at 10:57 AM, yojava <mhu...@gmail.com> wrote:
> Hi,
> Is anyone interested in a lightweight JSON microformat/schema for
> Atom? Existing formats (such as Google Data Protocol) have a lot of
> XML baggage and don't really play to the strengths of JSON (simple,
> lightweight and readable).

Did you checkout out Activity Streams? (http://activitystrea.ms/)
It has JSON format designed specifically, separate from older
Atom-based variant; so it sounds like it might be what you were
looking for...

-+ Tatu +-

mike amundsen

unread,
Jun 22, 2011, 6:38:04 PM6/22/11
to restfu...@googlegroups.com
This may not be what you are looking for, but I have been working on a list/detail hypermedia JSON design that is currently called "Collection.JSON"[1]

Like your design, mine has a nod toward Atom, but doesn't really "mirror" Atom. It's not tied to the "feed" model, but I've used it for that kind of work a number of times (along with more general list/detail work).  I've been using it in a handful of projects with good results. 

Like Atom, Collection.JSON is based on the CRUD pattern but two big differences in this design (compared to Atom) are: 
- the use of the "queries" collection for publishing ad-hoc queries (search, sort, filter, etc.); something that Atom does not support right now.
- the use of the "template" object for advertising details on how to add/edit entries in the collection; something Atom does not currently do (inline) either.

You can check out the detailed documentation online[2] along with some basic examples[3]. Feel free to post feedback here or ping me directly (mam...@yahoo.com)


Kevin Marks

unread,
Jun 22, 2011, 10:23:09 PM6/22/11
to restfu...@googlegroups.com

Also look at the output format defined by http://feedparser.org which is a robust and well-tested comprehensive representation of.atom, rss etc

Ed Summers

unread,
Jul 28, 2011, 10:02:31 AM7/28/11
to restfu...@googlegroups.com
Another one to check out is JSON-C from Google/YouTube:

http://code.google.com/apis/youtube/2.0/developers_guide_jsonc.html

//Ed

Reply all
Reply to author
Forward
0 new messages