[openbiblio-dev] JISC openbib update

Mark MacGillivray mark at odaesa.com
Wed May 4 16:28:20 UTC 2011


Hi guys,

thanks for all the discussion. We are working through an example that
we will put up shortly. For now, here is our main issue:

* RDF/JSON is easier to serialise, and we have done so
* RDF/JSON feels harder to hand-write than JSON-LD
* although if we introduced namespacing to RDF/JSON, it would probably even out
* JSON-LD handles namespaces
* but JSON-LD is harder to serialise and we have not done it yet
* comparison of RDF/JSON and JSON-LD from the front end

here is an RDF-JSON:

{
    subject:{
    predicate:[object],
    predicate:[object],
    },
}

so I can get a list of subjects as the top level keys, and I can find
all the predicate/object pairs below that.

here is a JSON-LD:


{
   "#": namespace,
   "@": subject,
   "a": type,
   "foaf:homepage": "<http://example.com/bob/>",
   "foaf:name": "Bob"
}


so I have a list of things, and in each thing the @ key tells me the
subject, the # key tells me the namespaces, the "a" tells me the type,
and the rest are basically key/value pairs.

JSON-LD therefore does look more like a typical JSON object - although
the RDF/JSON is only one level deeper, really.

Additionally, if representing a disjoint graph in JSON-LD, I have to
go further into the nest:

{
  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
  "@":
  [
    {
      "@": "<http://example.org/people#john>",
      "a": "foaf:Person"
    },
    {
      "@": "<http://example.org/people#jane>",
      "a": "foaf:Person"
    }
  ]
}

and this is not that obvious.

Richard and I both feel so far that RDF/JSON actually seems easier to
get into to begin with, but JSON-LD gets better once you get the hang
of it, and would be nicer to deal with at the front end after a
learning curve. Although this might be because we are both somewhat
familiar with triples anyway.

We are continuing the comparison, and will have write-ups soon. Let me
know if I have written anything wrong here,


Mark




On Wed, May 4, 2011 at 4:33 PM, William Waites <ww at styx.org> wrote:
> * [2011-05-04 16:25:05 +0100] Rufus Pollock <rufus.pollock at okfn.org> écrit:
>
> ] But we're not interested in RDF/JSON (since no-one who does JSON who
> ] is not already involved in the semantic web will be interested). If
> ] RDF/JSON is all we can do why not just use our big sparql endpoint and
> ] be done with it (exaggerating a bit but not not much ...)
>
> Who is we?
>
> ] How badly do these problems affect us in, say, bibliographica.org (as
> ] opposed to the general case)?
>
> Badly.
>
> ] But our current dictiziation / serialization is certainly no better
> ] than JSON-LD and arguably worse. That is what JSON-LD was proposed for
> ] (not some general let's serialize arbitrary RDF ...)
>
> Right, so if we don't want to do it properly we should just stick with
> what we have. The marginal benefit of moving to JSON-LD is small if it
> is just special case code for bibliographica.
>
> ] a) RDF/JSON seems to be the only thing serializable (not surprising
> ] since it basically is RDF)
>
> No, JSON-LD (CURIE) is serialisable. It just isn't predictable which
> means you push the burden onto the client of turning it back into RDF
> or back onto the server to hand-code things.
>
> ] b) But RDF/JSON is no good for general consumers (the very reason we
> ] are creating the JSON APIs)
>
> There's no problem having an RDF/JSON serialisation along side the
> frankenbibliojson. It does make things easier for e.g. JavaScript UI
> work where you actually care about the meaning of the data. And as was
> proven, is easy to do.
>
> -w
>
> --
> William Waites                <mailto:ww at styx.org>
> http://river.styx.org/ww/        <sip:ww at styx.org>
> F4B3 39BF E775 CF42 0BAB  3DF0 BE40 A6DF B06F FD45
>




More information about the openbiblio-dev mailing list