[uf-dev] JSON serialization of microformats

Mike Kaply microformats at kaply.com
Thu Oct 4 10:23:37 PDT 2007


On 10/4/07, Jim Wilson <wilson.jim.r at gmail.com> wrote:
>
> Hi Dimitri,
>
> > 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.
>
> Personally (and this is just my opinion) I don't like that.  In order
> to enforce such a rule, you have to know in advance whether any
> particular thing can or cannot be plural - which would seem to be
> context specific.


You do know in advance. The microformat spec indicates which things are
plural

Also, what does that say about when something can be plural but there
> are none of them? Should it be an empty array?  Should it be null?
> Should the value even be represented as a key in the parent hash?


In JSON it simply wouldn't be in the structure at all...

Mike Kaply
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://microformats.org/discuss/mail/microformats-dev/attachments/20071004/0c7f67c3/attachment.html


More information about the microformats-dev mailing list