OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

oslc-core message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: JSON-LD of compact resources


My take on this:

1. Somewhere the consumer gets the URL for the compact resource, probably through
    following a link from another resource.
2. It knows, through a specification it was implemented against (i.e. a resource shape
    from that spec) that the target of that link is "likely to be" a compact representation.
3. It requests that URI, using either Accept: application/json or Accept: application/ld+json.

4a) IF the consumer requested application/json then:
   4ai)IF the resource really is a compact representation then it contains property names

        "title", "shorttitle", etc.
    4aii)IF it is not, the consumer ignores it and cannot display the resource preview.

4b) IF the consumer requested application/ld+json then:
   4bi) IF the resource really is a compact representation then it contains JSON-LD

        containing predicates http://purl.org/dc/terms/title,
        http://open-services.net/ns/core#shortTitle, etc
    4bii) IF it is not, the consumer ignores it and cannot display the resource preview.


There's nothing to stop other properties being included (i.e. user a "superset" resource shape being used) for either case.

There could be a single representation that fulfills both "shapes"/expectations if that representation is JSON-LD using the context in http://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/specs/resource-preview.html#h2_json-representation-format

If we said providers MUST support the application/json route, and MAY support application/ld+json (and MAY support application/turtle), then:
1. consumers that just wanted plain JSON (i.e. who don't have a JSON-LD library) could always ask for it. and
2. providers that wanted RDF (who have a JSON-LD library) could ask for "Accept: application/ld+json, application/json;q=0.9", then if they get back "Content-Type application/json" they can apply the @context that's in the spec, if they get back "Content-Type: appliation/ld+json" it's already there, and then in either case they can use their JSON-LD library to parse it.

Martin Pain
Software Developer - Green Hat
Rational Test Virtualization Server, Rational Test Control Panel
Open Services for Lifecycle Collaboration - Automation WG joint chair

E-mail: martinpain@uk.ibm.com
Find me on:
LinkedIn: http://www.linkedin.com/profile/view?id=99869908 and within IBM on: IBM Connections: https://w3-connections.ibm.com/profiles/html/profileView.do?userid=12c849c0-ddd5-1030-9b5f-d70a3a891b7f 
IBM



IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]