Examples from Intertwiningly, which BC uses as exemplar for default behavior

Entries

Sample entry perma-link: http://www.intertwingly.net/blog/2007/01/15/application-atom-json

Note: http://www.intertwingly.net/blog/2007/01/15/application-atom-json/ (Trailing slash) also works, without redirect

Note: http://www.intertwingly.net/blog/2007/1/15/application-atom-json (month as 1 integer) also works, without redirect

For that day: http://www.intertwingly.net/blog/2007/01/15/

Feed: http://www.intertwingly.net/blog/2007/01/15/index.atom

HTML page header:

<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<title>Sam Ruby: 15 Jan 2007</title>
<link rel="alternate" type="application/atom+xml" title="It’s just data" href="http://www.intertwingly.net/blog/index.atom"/>
<link rel="openid.server" href="http://intertwingly.net/id/"/>
<link rel="search" type="application/opensearchdescription+xml" href="http://intertwingly.net/search/" title="intertwingly blog search"/>
<link rel="stylesheet" href="/css/blog.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="/css/print.css" type="text/css" media="print"/>
<link rel="shortcut icon" href="/favicon.ico"/>
<meta name="ICBM" content="35.708298,-78.695515"/>
</head>

Month: http://www.intertwingly.net/blog/2007/01/

Year: http://www.intertwingly.net/blog/2007/

If you suf to a date with only one entry you get redirected to that entry. e.g.:

http://intertwingly.net/blog/2007/01/11/ -- redirect --> http://intertwingly.net/blog/2007/01/11/html5lib-Deployed

Feed details

From http://www.intertwingly.net/blog/2007/01/15/index.atom

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="self" href="http://www.intertwingly.net/blog/index.atom"/>
  <id>http://www.intertwingly.net/blog/index.atom</id>
  <icon>../favicon.ico</icon>

  <title>Sam Ruby</title>
  <subtitle>It’s just data</subtitle>
  <author>
    <name>Sam Ruby</name>
    <email>rubys@intertwingly.net</email>
    <uri>.</uri>
  </author>
  <updated>2007-01-16T17:00:04-05:00</updated>
  <link href="."/>

  <entry>
    <id>tag:intertwingly.net,2004:2472</id>
    <link href="2007/01/15/application-atom-json"/>
    <link rel="replies" href="2472.atom" thr:count="9" thr:when="2007-01-16T16:08:58-05:00"/>
    <title>application/atom+json ?</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><svg xmlns="http://www.w3.org/2000/svg" xmlns:l="http://www.w3.org/1999/xlink" width="100" height="102" style="float:right">
  <radialGradient id="jsongrad" cx="65" cy="90" r="100" gradientUnits="userSpaceOnUse"><stop stop-color="#EEF"/><stop offset="1"/></radialGradient>
  <path d="M61,02 A 49,49 0,0,0 39,99 C 9,79 10,24 45,25 C 72,24 65,75 50,75 C 93,79 91,21 62,02" id="jsonswirl" fill="url(#jsongrad)"/>
  <use l:href="#jsonswirl" transform="translate(50,50) rotate(180) translate(-50,-50)"/>
  <g transform="scale(2) translate(25,25)" fill="none">
    <ellipse stroke="#66899a" rx="3" ry="22"/>
    <ellipse stroke="#e1d85d" rx="3" ry="22" transform="rotate(-66)"/>
    <ellipse stroke="#80a3cf" rx="3" ry="22" transform="rotate(66)"/>
    <circle fill="#80a3cf" r="6.5" stroke="#FFF"/>
 </g>

</svg>
<p><a href="http://www.agileprogrammer.com/eightytwenty/archive/2007/01/15/22042.aspx"><cite>Gordon Weakliem</cite></a>: <em>I’ve run into a few references to Atom - JSON mappings, but nothing really canonical yet.</em></p>
<p>In addition to NewsGator, there seems to be some interest at <a href="http://code.google.com/apis/gdata/json.html">Google</a>, <a href="http://journals.aol.com/panzerjohn/abstractioneer/entries/2007/01/12/generic-atom-to-json-conversion/1397">AOL</a>, and the <a href="http://www.mail-archive.com/abdera-dev@incubator.apache.org/msg00979.html">ASF</a>.</p>

<p>Perhaps it is time for an RFC?</p></div></content>
    <updated>2007-01-15T19:55:56-05:00</updated>
  </entry>

  <entry>
    <id>tag:intertwingly.net,2004:2471</id>
    <link href="2007/01/15/SVG-Comments"/>
    <link rel="replies" href="2471.atom" thr:count="2" thr:when="2007-01-15T13:15:14-05:00"/>
    <title>SVG Comments</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" style="float:right">
 <g stroke-width="12" stroke="#000">
   <g id="svgstar" transform="translate(50,50)">
     <path id="svgbar" d="M-27-5a7,7,0,1,0,0,10h54a7,7,0,1,0,0-10z"/>
     <use xlink:href="#svgbar" transform="rotate(45)"/>
     <use xlink:href="#svgbar" transform="rotate(90)"/>
     <use xlink:href="#svgbar" transform="rotate(135)"/>
   </g>
 </g>
 <use xlink:href="#svgstar" fill="#FB4"/>

</svg>
<p><a href="http://bitworking.org/news/">Joe Gregorio</a> has reenabled comments on his weblog. To my knowledge, he has the first weblog that <a href="http://bitworking.org/news/90/It-ll-have-to-go#X2">accepts SVG</a> in comments. Oh, and the <a href="http://bitworking.org/news/90/It-ll-have-to-go">parent post</a> is priceless.</p>
<p>It is not often that I’m jealous... but one thing is certainly true, I rarely stay jealous for long. :-)</p></div></content>
    <updated>2007-01-15T11:20:21-05:00</updated>
  </entry>

</feed>

Comments

Some sample comments:

<a id="comments"/>
<h2>Mon, 15 Jan 2007</h2>
<div class="comment">
<hr/>
<a id="c1168914742"></a>
+1. Just so long as whoever writes it doesn&#8217;t attempt to do some generic XML-to-JSON mapping crap with it.&#160; If you&#8217;re going to do an Atom-to-JSON mapping, take the time to make the JSON mapping relatively decent.&#160; I&#8217;ll commit to making sure Abdera has support once the first draft is published.

<br />
<br />
Posted by <a class="openid" href="http://id.snellspace.com" title="http://id.snellspace.com/">James M Snell</a> at
<a href="http://www.intertwingly.net/blog/2007/01/15/application-atom-json#c1168914742">21:32</a>
</div>

<div class="comment">
<hr/>
<a id="c1168918341"></a>
James is right. XML is a document. JSON is a data structure. The principles behind the Atom format, namely web content and metadata, can be translated to JSON. This is about Atom to JSON mapping, not XML to JSON mapping. Further, <a href="http://bitworking.org/news/JEP">Joe proposed JEP, a REST protocol for JSON data structures</a>.
<br />

<br />
Posted by <a class="openid" href="http://brandonsmith.myopenid.com/" title="http://www.myopenid.com/server">Brandon Smith</a> at
<a href="http://www.intertwingly.net/blog/2007/01/15/application-atom-json#c1168918341">22:32</a>
</div>

<h2>Tue, 16 Jan 2007</h2>
<div class="comment">
<hr/>
<a id="c1168967496"></a>
<p>Forgot to mention <a href="http://jsonml.org/">JsonML</a>, so we now have a generic XML-to-JSON mapping:</p>
<pre class="code">"summary": { "xhtml": [
    "p",
        "Just a single paragraph with an ",
        [ "em", "emphasized" ],
        " word"
    ] }</pre>
<p>(Note that I didn&#8217;t included the <code>&lt;xhtml:div&gt;</code> that is required in Atom&#8217;s XML serialization)</p>

<p>Still lacks namespace handling, so that&#8217;s still not usable for Atom extensions (or foreign markup &#8211;such as MathML or SVG&#8211; in XHTML content).</p>
<p>JsonML uses <code>"xmlns"</code> and <code>"xmlns:&#8230;"</code> attributes (the same kind of serialization as Namespaces in XML). Google uses something similar too.</p>
Posted by <a title="81.80.93.141">Thomas Broyer</a> at

<a href="http://www.intertwingly.net/blog/2007/01/15/application-atom-json#c1168967496">12:11</a>
</div>

Comment form:

<div class="commentform">
<h2>Add your comment</h2>
<a id="commentForm"></a>
<form method="post" action="http://www.intertwingly.net/blog/" accept-charset="utf-8"
  id="comments_form" onsubmit="if (this.bakecookie.checked) rememberMe(this)">
<div class="comment">
<input name="parent" type="hidden" value="2472"/>

<input name="title" type="hidden" value="application/atom+json ?"/>
<label for="name">Name:</label><br/>
<input maxlength="50" id="name" name="name" size="75" type="text" value=""/><br/>
<br/>
<label for="email">E-mail:</label><br/>
<input maxlength="75" id="email" name="email" size="75" type="text" value=""/><br/>
<br/>
<label for="url">URI:</label><br/>
<input maxlength="100" id="url" name="url" size="75" type="text" value=""/><br/>
<br/>
<label for="comment">Comment:</label><br/>
<textarea cols="59" id="comment" name="comment" rows="12"></textarea>
<br/>

<input name="preview" type="submit" value="Preview"/>
<input type="button" onclick="forgetMe(this.form)" value="Clear Info"/>
<input type="checkbox" name="bakecookie" id="bakecookie"/>
<label for="bakecookie">Remember info?</label>
</div>
</form>

</div>

Trackback

<!--
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <rdf:Description
      rdf:about="http://www.intertwingly.net/blog/2472.rdf"
      trackback:ping="http://www.intertwingly.net/blog/2472.tb"
      dc:title="application/atom+json ?"
      dc:identifier="http://www.intertwingly.net/blog/2007/01/15/application-atom-json" />
  </rdf:RDF>
-->

Bright_Content/Design/Intertwiningly_Examples (last edited 2008-11-24 18:46:30 by localhost)