[uf-dev] JSON serialization of microformats

Dimitri Glazkov dimitri.glazkov at gmail.com
Thu Oct 4 08:53:53 PDT 2007


Just had a brief conversation on IRC w/Mike, and I agree with him
(Mike, feel free to object if I am putting words in your mouth). We
need to set some guidelines (standard?) on JSON serialization of
microformats. This has been an issue of minimal importance when JSON
intersection was limited to test cases, but with arrival of Optimus,
the mass has shifted.

For instance, currently Optimus (Dmitry, this is no knock against you
or the product), will intelligently substitute values for arrays if
there is more than one value detected. For instance, hcard: {} will
become hcard: [ {}, ... ] if there is more than one hcard. While this
is indeed clever, it requires branching for the reader of the
resulting JSON, albeit a very easy one.

It seems that if the value can be plural, it should be always wrapped
into an array. But ultimately, both Mike and I feel that this should
be agreed upon and documented on the wiki to let developers of JSON
producers and consumers be on the same page. I'd be happy to get the
process started, documenting existing behavior based on test cases and
Optimus output, provided we have consensus on utility of the endeavor.

What are your thoughts on this?

:DG<


More information about the microformats-dev mailing list