I am currently trying to use JSON-LD to make legacy JSON documents machine readable. Now I have a legacy document that contains a list of names. Each of these names references an entity for which I already have further knowledge in my graph and therefore I would like to link the existence of its name to the further attributes already known about it. But there is no IRI contained in the legacy JSON document, so when I convert it via JSON-LD, I just get unlinked string literals into my graph.
My legacy JSON document looks like this:
{
"url": "https://example.com/123",
"name": "Test",
"children": [
"Abc",
"Def",
"Xyz"
]
}
My JSON-LD context looks something like this currently:
{
"@context": {
"ex": "https://example.com/",
"name": "ex:name",
"children": "ex:has"
}
}
And in my knowledge store I have something like this already before interpreting the legacy document:
@PREFIX ex: <https://example.com/>
ex:abc ex:name "ABC".
ex:hasValue 123.
ex:def ex:name "DEF"
ex:hasValue 456.
ex:xyz ex:name "XYZ".
ex:hasValue 789.
Is there some supposed way to link the data attached i.e. to ex:xyz
by the name "Xyz" in the legacy document? Or is there no other way than to write a custom program to add futher triples for these links?
I would like to see the following in my extracted knowledge from the legacy JSON:
ex:123 ex:name "Test".
ex:has ex:abc.
ex:has ex:def.
ex:has ex:xyz.