rdf

quoll 2023-08-11T15:47:06.349549Z

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!

Max 2023-08-11T22:41:33.974709Z

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

quoll 2023-09-28T01:02:06.269369Z

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?

Max 2023-09-28T01:57:51.778499Z

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 🤷

quoll 2023-09-28T01:58:22.736989Z

No problem. I like Turtle more anyway 🙂

quoll 2023-09-28T01:59:51.556729Z

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

🎉 1
Max 2023-09-28T02:00:51.991619Z

That will hopefully speed up my data ingestion! Very exciting

quoll 2023-09-28T02:24:16.852459Z

I don’t know if it will be FASTER, but can definitely handle MORE 🙂

wikipunk 2023-08-18T18:10:24.372749Z

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.

winsome 2023-08-15T03:07:58.006879Z

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.

quoll 2023-08-11T23:16:30.519529Z

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

quoll 2023-08-11T23:17:16.174219Z

Or https://github.com/filip26/titanium-json-ld