This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-11
Channels
- # announcements (2)
- # beginners (30)
- # biff (6)
- # calva (4)
- # cider (4)
- # clj-yaml (3)
- # clojure (14)
- # clojure-europe (43)
- # clojure-nl (8)
- # clojure-norway (34)
- # clojure-uk (2)
- # clojurescript (11)
- # clr (2)
- # conjure (3)
- # cursive (1)
- # datomic (18)
- # helix (1)
- # humbleui (6)
- # hyperfiddle (110)
- # java (25)
- # kaocha (2)
- # lsp (29)
- # missionary (7)
- # off-topic (9)
- # pathom (106)
- # polylith (27)
- # rdf (12)
- # re-frame (9)
- # releases (4)
- # spacemacs (2)
- # tools-build (4)
- # tools-deps (6)
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
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.
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.
It’s a month and a half on and I’m wondering how you went @U01EB0V3H39? 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 🤷
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
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