base
has property a, that has some stuff in it base.a.a
whereas subtype sub1
adds another property to base.a
: sub1.a.b
credentialSubject
field is defined to be of type @id
https://www.w3.org/2018/credentials/v1 , but in the examples given at https://www.w3.org/TR/vc-data-model/#credential-subject it is variously a JSON object and a JSON array
credentialSubject
the fact the the context (not vocabulary) say's it's of type @id
means that string values of credentialSubject
should be interpreted as IRIs, represented in expanded form as an object with a single @id
property.
@id
. Note that the context is not a schema language, just a way to make sure that values are interpreted properly.
Hi everyone, I am looking for a tool that can take a JSON file (not a valid JSON-LD) plus a JSON-LD context as described in https://w3c.github.io/json-ld-syntax/#interpreting-json-as-json-ld and to output Turtle (or expanded JSON-LD or N-Triples, for example, so that it's easy to convert them to Turtle). I tried https://json-ld.org/playground/, http://rdf.greggkellogg.net/distiller, https://github.com/digitalbazaar/jsonld-cli but they all seem to be able to compact a JSON-LD context only when provided with a file that is already in JSON-LD format.
My use-case is to take a JSON output of the tool that only produces JSON and might not wish to change it's output format but may add a JSON-LD context header if I provide them with the context definition. So, a tool that would allow to quickly see what kind of Turtle serialisation my context definition would provide is quite valueable for feedback.
A library suggestion that allows this to be done is also welcome (I looked at https://github.com/ruby-rdf/json-ld but did not see a similar example). Thank you in advance!
@id
are treated as IRIs or blank node identifiers due to the data model requirements. The @id
identifies a node in a graph, and a language value (or really any literal) is not appropriate for this. You might use something that identifies a language, such as http://dbpedia.org/resource/English. but that's probably not what you're looking for.