W3C home > Mailing lists > Public > public-linked-json@w3.org > August 2014

Relative IRI in @context?

From: Sebastian Heath <sebastian.heath@gmail.com>
Date: Mon, 4 Aug 2014 14:01:27 -0400
Message-ID: <CACsb_1oxQPRc2hKduE+v6NQd9owMVrG=d1VyO7oaBETP4bfn6g@mail.gmail.com>
To: JSON-LD <public-linked-json@w3.org>
Hi,

 This may be a quick thread since perhaps I'm doing something wrong, but...

 I'd like to use a relative URI in @context. As in,

{

 "@context": "context.jsonld",

 "@graph": [ ... rest of the jsonld ... ]

}

When I use the jsonld command line tool from the node package I get

'jsonld.NormalizeError: Could not convert input to RDF dataset before
normalization.'

 The file is otherwise valid JSON and it works when I stick in a
fully-qualified IRI.

context.jsonld is a file on the local file system. Is there a better
way to specify it? I've also served it via python's simple http server
but also no luck using a relative IRI in @context.

 Use case is pretty straightforward in terms of sharing a context
among many files in a directory that can easily be served by just it
on a server. I do not want to have to set up a permanent IRI for the
context as that would mean it couldn't move with the files.

 Or am I doing something obviously wrong?

 Thanks,

 Sebastian.
Received on Monday, 4 August 2014 18:01:55 UTC

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