Follow all the links in the JSON-LD API

Let's say I want to use an API that returns JSON-LD and track all links. (I am experimenting with Hydra API-Demo , but it should work with all JSON-LD APIs, not just Hydra . Any good APIs I should try?)

So, I want to keep track of all the links, and my environment does not support RDF support. Probably, first I should parse it using one of the libraries and translate it into an extended form using jsonld.expand() . Then I just grab all the values ​​with the @id key. Is this the recommended way to do this, or am I missing some edge cases?

+2
hateoas json-ld
source share
1 answer

The purpose of the extension API is to create regular, context-free output (extended form) for algorithmic processing - this is exactly what you want to do. So yes, you have the right approach; you should not miss any extremes, as I understand you. Once you have JSON-LD in extended form, you can easily follow @ids (and if you also need to do some kind of dictionary / ontology analysis, you can follow the properties, which then will be fully extended URLs )

+2
source share

All Articles