[uf-discuss] Re: Standardized Representation of Microformats in JSON / was: (no subject) & hCardMapper v0.96

Toby A Inkster mail at tobyinkster.co.uk
Thu Apr 3 00:06:30 PST 2008


Gordon wrote;

> I am undecided on disallowing or forcing reduction of Arrays and
> Objects, when they only hold a single value. There is definitely an
> advantage in disallowing reduction, as it reduces authoring choices  
> and
> thus complexity. So if we want to keep it simple, I guess  
> disallowing is
> the right choice. On the other hand, JavaScript is loosely typed  
> and we
> could come up with a much more compact jCard if we force reduction.

I say disallow. Allowing this would increase complexity at the  
consumer side. Forcing it increases the complexity at the producer  
side as well. If people are worried about compactness, they should  
use "Content-Encoding: gzip".

I'm pretty close to an implementation for jCard. So far, missing  
'adr', 'org' and 'agent', but have implemented all other properties,  
plus vCard 'X-GENDER' as 'xGender' in jCard. Right now my JSON  
violates rule #5: there's plenty of empty arrays.

	"key": [], "mailer": [], etc

I hope to get that fixed too. But otherwise, nearly there!

-- 
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>


More information about the microformats-discuss mailing list