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

Re: [FHIR JSON-LD] Different mappings for different nestings?

From: Nicholas Bollweg <nick.bollweg@gmail.com>
Date: Sat, 18 Apr 2015 18:34:52 -0400
Message-ID: <CACejjWxRiRayV_Q1-W-xY=nnMKLg4+TMb+mB8qzkVPdy-74uRQ@mail.gmail.com>
To: David Booth <david@dbooth.org>
Cc: Linked JSON <public-linked-json@w3.org>, Josh Mandel <Joshua.Mandel@childrens.harvard.edu>, Jim McCusker <mccusj@rpi.edu>, Markus Lanthaler <markus.lanthaler@gmx.net>, Manu Sporny <msporny@digitalbazaar.com>, Grahame Grieve <grahame@healthintersections.com.au>
I have wondered if being able to specify a number of the @ keywords inside
parts of the context would give us this power. Here's @context inside
@context:
{
  "@context": {
    "sns": "http://some/namespace",
    "person": {
      "@context": {
        "name": "sns:personName"
      }
    },
    "organization": {
      "@context": {
        "name": "sns:organizationName"
      }
    }
  },
  "person" : {
    "dob" : "1975-01-01",
    "name" : {
    "family" : "Smith",
    "given" : "Joe"
    }
  },
  "organization" : {
  "name" : "Acme"
  }
}

I could imagine this adding a good deal of complexity to the
implementation, which I haven't yet attempted... any insights from
implementers?

Similarly, being able to specify @vocab inline would be a start towards
things like package.json's dependencies:

{
  "@context": {
    "dependencies": {
      "@vocab": "http://npmjs.org/package/"
    }
  },
  "dependencies": {
    "jsonld": "~0.3.x"
  }
}

Of course, this would suggest that while jsonld would be expanded to
http://npmjs.org/package/jsonld but so would the version spec... which is
still weird. Of course, the relationship is pretty complex: <package> has
dependency [has package <npm:jsonld>, has version <npm:~0.3.x>] which would
require a lot of model knowledge anyway.
Received on Saturday, 18 April 2015 22:35:19 UTC

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