> > > - how do I know which node is the root node in the json-ld? > > what you get is a (RDF) graph, and in the general case, several resources > are described (cf. for instance the “@graph” in the jsonld). If you’re in > the case where you have one “main resource”, described in the jsonld, and > if what you want is the URI of this resource (the “@id” of the resource at > “the top” of the json tree), then you may try to list resources in the RDF > that are not object of any triple (but I think that other resources may > also be in this case, for instance if there are “reverse properties”) >
hm. is it just me who thinks that the root node has significance? I'm surprised that this isn't something that comes up a lot. (yes, in some circumstances, it's the single resource that is not an object, but as you scale up that becomes more and more restrictive) > - how do I figure out what the original order of a json array is, when i'm > > looking at the triples > > I’m afraid you can’t. JSON-LD arrays are not ordered by default (the > opposite from regular JSON arrays) If the order matters,"@list” should be > used in the jsonld (and you then get a rdf:list in RDF) > see https://www.w3.org/TR/json-ld/#sets-and-lists of course. sigh. thanks Grahame
