W3C home > Mailing lists > Public > public-linked-json@w3.org > March 2015

Re: [FHIR JSON-LD] Possible to specify namespace of object node in @context?

From: David Booth <david@dbooth.org>
Date: Fri, 13 Mar 2015 17:32:48 -0400
Message-ID: <55035780.6010108@dbooth.org>
To: Dave Longley <dlongley@digitalbazaar.com>, public-linked-json@w3.org
CC: Manu Sporny <msporny@digitalbazaar.com>, markus.lanthaler@gmx.net, Jim McCusker <mccusj@rpi.edu>
Excellent, that worked.  Thanks!

David Booth

On 03/13/2015 05:18 PM, Dave Longley wrote:
> On 03/13/2015 04:56 PM, David Booth wrote:
>>
>> Is it possible to use @context to generate the type of b:obs123 as
>> fhir:Observation instead of b:Observation?
>
> Try changing your context to:
>
> {
>     "@context": {
>        "@base": "http://example/base/",
>        "@vocab": "http://example/vocab#",
>        "fhir": "http://example/fhir#",
>        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
>        "resourceType": {
>           "@id": "rdf:type",
>           "@type": "@vocab"
>        },
>        "Observation": {"@id": "fhir:Observation"}
>     }
>
> Note the changes were "@type" becomes "@vocab" instead of "@id" for
> "resourceType". This enables vocabulary processing on values of
> "resourceType" vs. only URL processing. Then, an entry was added for
> "Observation" that points it at the right vocabulary term.
>
Received on Friday, 13 March 2015 21:33:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:44 UTC