Marcel Molina (@noradio) recently posted the following announcement to
the Twitter API Announcements list:

In it, he describes a new Annotation model consisting of <Namespace,
Key[, Value]> attached to each tweet. One of the sticking points is
that the Annotation must be serializeable to XML, which, depending on
the format picked, imposes certain limitations on the content of
Namespace and Key.

<quote author="@noradio">

    'isbn': '030759243X'
    'url': '


  XML option #1 which is succinct but restricts the possible values of
namespaces and keys


  XML option #2 which is more verbose but allows for namespaces and
keys to
contain arbitrary data


If we went with XML option #2 it may or may not be a problem that it
"symmetrical" with the JSON representation. On the other hand, JSON
and XML
tend to be culturally at opposite sides of the Pithiness Spectrum.

I, for one, don't mind the restriction on keys being valid XML tag
names, but the restriction on namespaces might be more challenging. In
my opinion, the correct namespace for "ISO" is "net.iso" and that for
"Amazon" is "" Indeed, the namespace for this particular
annotation might be ""

By adding XML attributes into the mix we might be able to retain the
basic structure of the JSON while allowing a broader set of

  <namespace name="">

If, on the other hand, we don't mind being a little less JSON-ey and a
little more XML-ey in our XML, we could do

  <isbn ns="org.iso">
  <url ns="">

I wish I had some firm answers, but hopefully these ideas will get
some good debate going.


Reply via email to