[oslc-core] Problem with OSLC v1 style JSON representations

Dave snoopdave at gmail.com
Wed Mar 3 12:51:51 EST 2010


In the OSLC v1 specs, the JSON representations do something that seems
unusual and problematic to me. Here is an example of the type of
representations we specify in the v1 specs:

    {
        "rdf:about": "http://example.com/sillyness/2314",
        "dc:title": "Silly example BR549",
        "dc:creator": "John Bonham",
        "dc:creator": "Keith Moon"
    }

One of the most attractive features of JSON is that JSON data can be
easily parsed into JavaScript objects (see also
http://www.json.org/js.html) but our representation prevents this from
working for two reasons:

1) The use of colons in the field names does not work in JavaScript; a
JavaScript variable cannot have a colon in its name.
2) We allow multivalued properties, but you cannot have two variables
with the same name in a JavaScript object.

If you take a look at the OSLC Core Spec draft section below you can
see what I am proposing as an alternative to the v1-style JSON
representations. It does not suffer from the above two issues:

   http://open-services.net/bin/view/Main/OSLCCoreSpecDRAFT?sortcol=table;up=#JSON_Representation

Your comments and suggestions are most welcome.

Thanks,
Dave




More information about the Oslc-Core mailing list