[oslc-core] Multi-types resources in JSON representation

Olivier Berger olivier.berger at it-sudparis.eu
Tue Jan 18 05:15:30 EST 2011


Hi.

Le vendredi 14 janvier 2011 à 15:00 -0500, James Conallen a écrit :
> The guidance for JSON states that JSON representations should have a
> type: 
> 
>         
>         rdf:type A resource can have multiple types, so this is a JSON
>         Array of objects, each with an rdf:resource field that is a
>         type of the resource. 
> 

I'm not sure rdf:type should be any different than any other property of
a resource.

Thus, the rules in [0] :
        1.0 For each property of a resource
        
            * 1.1 Add field to the resource's JSON object with name set to Prefixed Name of property
                  o 1.1.1 If the property is specified as a single-valued property, then make field's value literal or JSON Object
                  o 1.1.2 If the property is specified as a multi-valued property, then make field's value JSON Array 
        
would lead me to believe that unique rdf types should not be arrays and multiple ones should.

[0] http://open-services.net/bin/view/Main/OSLCCoreSpecAppendixRepresentations?sortcol=table;up=#Guidelines_for_JSON

Any other opinions ?

Best regards,
-- 
Olivier BERGER <olivier.berger at it-sudparis.eu>
http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingénieur Recherche - Dept INF
Institut TELECOM, SudParis (http://www.it-sudparis.eu/), Evry (France)





More information about the Oslc-Core mailing list