@context vs. Turtle @prefix

Hi group,

(repost, didn't make it trough the queue last night it seems)

I'm working on a Pubby-like basic LDP frontend which so far can return
classical RDF representations of URIs, like text/turtle,
application/rdf+json etc.

To convince web developers to use it I would like to introduce json-ld
as well. My goal is to have something like a well prefixed turtle
representation but in json-ld. This means that I want to see as few URIs
as absolutely necessary for the predicates itself.

The prefixed sample turtle output looks like this

http://ktk.netlabs.org/misc/12099-shrink.ttl

With the help of http://rdf-translator.appspot.com/ I managed to get a
basic json-ld version of this:

http://ktk.netlabs.org/misc/12099.jsonld

I do see that it did compact some things compared to the
application/rdf+json output. But I guess it's not "sexy" enough yet so
that a web developer would be able to use it without big issues.

In the samples on the homepage I found the compacted versions, the node
demo did a nice sample on the payswarm URI. But after having a look at
the specs I fail to understand if this really provides what I would like
to have:

- can I get JSON-LD in the style of the prefixed turtle output which
gets rid of the URIs?
- in the samples I found mostly one URI in @context, can I have multiple
shortcuts in a way like multiple @prefix in turtle?
- How do I get a compacted sample with the commandline node tools from
my basic JSON-LD version? I tried this:

../jsonld.js/bin/jsonld compact -c
"http://data.admin.ch/bfs/municipality/" 12099.jsonld

jsonld.CompactError: Could not process context before compaction.

thanks

regards

Adrian

Received on Friday, 6 September 2013 17:00:31 UTC