I like to check in on this channel as much as I can, but this past week I’ve been in Chicago for work, and totally missed your question @simongray. Sorry about that!
Is there a recommended library for parsing JSON-LD? I saw @quoll’s ttl libraries, but the only ones I found for JSON-LD were grafter which has limited docs and https://github.com/fluree/json-ld which doesn’t seem to be on clojars or maven anywhere
It’s a month and a half on and I’m wondering how you went @max.r.rothman? I’ve been working with the ICD-11 api, which returns JSON-LD, so I ended up going with Titanium. It works, but it’s very frustrating. (Enough so that I’m wondering about trying it for myself) What did you end up using?
I ended up finding an ntriples version of the data and used your excellent ttl library to parse it, since ntriples is a subset of ttl. Sorry I can’t help 🤷
No problem. I like Turtle more anyway 🙂
I’m updating Raphael, BTW. It’s about to read from a Reader, and not from a string. I’m gradually working through the tests until I’m satisfied for release. This is allow it to deal with bigger files
That will hopefully speed up my data ingestion! Very exciting
I don’t know if it will be FASTER, but can definitely handle MORE 🙂
Apache Jena uses Titanium (I think) to parse JSON-LD -- You can give the RDF parser a JSON-LD string and get a Jena graph of the RDF triples in it. Using Aristotle you can get a nice EDN representation of the RDF but be aware of blank nodes. What I have done is since I'm using Datomic I assign every blank node a :db/id which is randomly generated and then transact them into the database. But that's unusual.
I work at Fluree with the json-ld stuff, our implementation is not yet an official https://www.w3.org/TR/json-ld11-api/ compliant one. I have looked at the java ones, though! • jsonld-java has been around longer and is pretty fast, but does not support JSON-LD 1.1, just 1.0. • titanium-json-ld has full 1.1 support but it is an implementation that targets correctness first, sometimes at the expense of speed. I haven't dug into titanium's implementation to see if there's low-hanging performance fruit, but I do know that 1.1 support is more complex and that may be one of the reasons that jsonld-java hasn't added it yet.
I’ve been thinking about doing this (since Asami is halfway there with its JSON-triples conversion), but to my knowledge there isn’t one out there. I’d go with a Java one, like https://github.com/jsonld-java/jsonld-java