Archives for: May 2009


Permalink 10:24:41 am, by fumanchu Email , 356 words   English (US)
Categories: IT

Somebody needs to discover JSON

In The text/plain Semantic Web, Benjamin Carlyle argues:

Perhaps the most important media type in an enterprise-scale or world-scale semantic web or REST architecture is text/plain. The text/plain type is essentially schema free, and allows a representation to be retrieved or PUT with little to no jargon or domain-specific knowledge required by server or client. It is applicable to a wide range of problems and contexts, and is easily consumed by tools and humans alike.

Substitute 'application/json' and that paragraph starts to make sense. But then, the author also says "To my mind the best resource in formatting and processing of simple text-compatible data types can be found in the specification for XML Schema." So perhaps I shouldn't be too hard on the poor refugee. He comes tantalizingly close:

Part of the problem that emerges is that text/plain is not specific enough. It doesn't have sub-types that are clearly tied to a specification document or standards body. This makes interoperability a potential nightmare of heuristic detection.


Another problem with using text/plain in its bare form is its default assumption of a US-ASCII character type. This can lead to obvious problems in a modern internationalised world.

Both of which JSON solves nicely: it has basic types and SHALL be encoded with a Unicode encoding (utf8 by default).

Again, ideally we would be making use of a well-defined standards body to own and maintain the media types used to communicate very basic information.

The IANA and IETF sound like well-defined standards bodies to me...

Perhaps the clearest indication that you are overusing text/plain is that you are experiencing an explosion in hyperlinks. When you start to need a document to provide links for consumers to find these text/plain-centric resources, you should probably consider incorporating the information directly into these documents themselves.

A. Hyperlinks are a Good Thing.

B. You should first consider providing hyperlinks in a machine-discoverable fashion; text/plain is not it. A nice version of "it" is using XHR to GET/PUT application/json resources.

C. Allow comments on your blog.

Permalink 10:00:00 am, by fumanchu Email , 22 words   English (US)
Categories: IT, CherryPy

Best of PyCon 2009

Toshio Kuratomi's How to Build Applications Linux Distributions will Package. As a web framework dev, this was priceless.

May 2009
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30


The requested Blog doesn't exist any more!

XML Feeds

powered by b2evolution