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

Benjamin Nowack bnowack at semsol.com
Thu Apr 3 00:39:20 PST 2008

On Apr 2, 2008, at 15:54:26 PST, Dmitry Baranovskiy wrote:
>We have a standard for  
>names, so, please, don’t invent the new one.
>n = {"given-name": "John", "family-name": "Doe"}
I second that. Based on inspiring conversations at SemanticCamp London
I started working on a test suite for microformats. It uses RDF and SPARQL
internally, so that pass/fail checks cann be done on a semantic, not a
syntactic level. One important requirement we identified back then was 
that a microformats parser should not have to produce URI-qualified 
snippets, but rather some intermediate, a bit more simple/compact format. 

The "microjson" idea sounds ideal for that. Mapping this sort of JSON 
structure to RDF (and vice-versa) should be straight-forward (no need to 
learn any new specs). It should be possible to semi-automate the conversion,
though, so I'd vote for keeping the names consistent accross all formats, 
too (although the camel-case conversion could be implemented as well).

An agreed-on intermediate format/model for parsed microformats would allow
me/us to directly re-use existing query and/or validation machinery for an 
easy-to-use and extensible test suite. I don't have a strong opinion on the 
[] vs. "" vs. {} (on RDF's triple level, things get unified anyway). But a 
predictable JSON structure for "instance data" would really simplify things
a lot.


Benjamin Nowack

>Agreed with everything else.
>On 03/04/2008, at 9:36 AM, Gordon wrote:
>> 3. All singular instance properties use only their correspong  
>> datatype for value.
>> Correct:
>> n = { givenName: 'John', familyName: 'Doe'}
>> fn = 'John Doe'
>> Wrong:
>> n = [ {givenName: 'John'}, {familyName: 'Doe'} ]
>> fn = {value: 'John Doe'}

More information about the microformats-discuss mailing list