[uf-discuss] Re: hCardMapper v0.96
Toby A Inkster
mail at tobyinkster.co.uk
Tue Apr 1 06:50:11 PST 2008
Gordon wrote:
> Unfortunately, all Microformat parsers yield different results when it
> comes to representing hCards in Json. None follows the jCard standard
> suggested at http://microjson.org/wiki/JCard.
The suggestion at that page defined new terms for various VCARD
properties. For example, "postal-code" becomes "postalCode". (Yes, I do
realise that hyphenated names are more difficult to use as JSON keys in
Javascript.)
There is no pattern to how these new terms are defined. e.g. the example
above drops the hyphen and adopts camelCase, but "given-name" apparently
becomes "given", and "adr" becomes "address". With these inconsistencies
in naming, the only way an author could implement jCard would be if there
was a full table mapping between hCard and jCard terms. There is no such
table on that page -- authors need to make guesses.
Whatsmore, in the example given, "tel" takes a single string as a value,
whereas surely it should be an array? People can have multiple phone
numbers. Ditto the single string for "email" and the single object for
"address".
If these issues could be addressed, I'd be happy to work on a jCard output
module for Cognition.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 6 days, 1:55.]
Cognition 0.1 Alpha 6
http://tobyinkster.co.uk/blog/2008/03/29/cognition-alpha6/
More information about the microformats-discuss
mailing list