- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Mon, 8 Jun 2015 23:44:29 +0200
- To: David Janes <davidjanes@davidjanes.com>
- Cc: Linked JSON <public-linked-json@w3.org>
- Message-ID: <CAKaEYh+RV4FtAtrkdoZbD1fka6L3YuRYNcXGMXczx==BOkVicA@mail.gmail.com>
On 8 June 2015 at 23:19, David Janes <davidjanes@davidjanes.com> wrote: > I'm not sure if I understand enough to answer the first question. > Did the context get pulled in to the software that is processing the json? Perhaps you could look in the source or network tab, if you're using a browser. > > As to the second, I thought this was the "correct practice" in the SemWeb > world? > http://www.w3.org/TR/cooluris/#r303gendocument > Views differ. Personally, I would consider using 303 here an anti pattern, because it increases implementation complexity, and I dont even know if all libraries support it yet. It's one of those ones where a group of people shouted loudly in favour it if, and it got in the spec. > > > Although I'm not using a 303 redirect yet. > > D. > > On Mon, Jun 8, 2015 at 5:14 PM, Melvin Carvalho <melvincarvalho@gmail.com> > wrote: > >> >> >> On 8 June 2015 at 22:11, David Janes <davidjanes@davidjanes.com> wrote: >> >>> Sorry for the lengthiness of this email, but I think I've got it down to >>> the minimal data to understand: >>> >>> Consider the following JSON-LD >>> >>> { >>> "@context": [ >>> "https://iotdb.org/pub/iot", >>> { >>> "@vocab": "https://iotdb.org/pub/iot#" >>> }, >>> { >>> "model": { "@type": "@id" } >>> } >>> ], >>> "@id": >>> "/api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light", >>> "model": >>> "/api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light/model" >>> } >>> >>> >>> This converts to the following nquads, exactly as expected >>> >>> </api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light> >>> <https://iotdb.org/pub/iot#model> >>> </api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light/model> >>> . >>> >>> >>> BUT the fact that >>> >>> "model": { "@type": "@id" } >>> >>> >>> is _already_ defined in "https://iotdb.org/pub/iot" (go look at " >>> https://iotdb.org/pub/iot.jsonld). So my understanding is we shouldn't >>> have to explicitly spell that out here. But when I do: >>> >>> { >>> "@context": [ >>> "https://iotdb.org/pub/iot", >>> { >>> "@vocab": "https://iotdb.org/pub/iot#" >>> } >>> ], >>> "@id": >>> "/api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light", >>> "model": >>> "/api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light/model" >>> } >>> >>> >>> We get >>> >>> </api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light> >>> <https://iotdb.org/pub/iot#model> >>> "/api/things/urn:iotdb:thing:REST:20b2c3ca712e8b0031debf3453cc75d1:rest-color-light/model" >>> . >>> >>> >>> Note that the last bit is not in angle brackets, it's a string not an >>> @id. >>> >>> Thoughts? >>> >> >> Is your remote context being pulled in to the processor? >> >> I'd also personally avoid redirects like the plauge, they can be quite >> hard to debug. >> >> >> >
Received on Monday, 8 June 2015 21:44:58 UTC