$ echo '{"@context": {"example":"http://example.com/"}, "@id": "example:with space:", "example:key": "value"}' | rdfpipe -i json-ld -o turtle /dev/stdin
@prefix example: <http://example.com/> .
Traceback (most recent call last):
File "/home/iwana/.local/bin/rdfpipe", line 8, in <module>
sys.exit(main())
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/tools/rdfpipe.py", line 183, in main
parse_and_serialize(args, opts.input_format, opts.guess,
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/tools/rdfpipe.py", line 56, in parse_and_serialize
graph.serialize(destination=outfile, format=output_format, **kws)
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/graph.py", line 968, in serialize
serializer.serialize(stream, base=base, encoding=encoding, **args)
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 247, in serialize
if self.statement(subject) and not firstTime:
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 314, in statement
return self.s_squared(subject) or self.s_default(subject)
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 318, in s_default
self.path(subject, SUBJECT)
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 333, in path
or self.p_default(node, position, newline)):
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 339, in p_default
self.write(self.label(node, position))
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/plugins/serializers/turtle.py", line 355, in label
return self.getQName(node, position == VERB) or node.n3()
File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/term.py", line 254, in n3
raise Exception('"%s" does not look like a valid URI, I cannot serialize this as N3/Turtle. Perhaps you wanted to urlencode it?'%self)
Exception: "http://example.com/with space:" does not look like a valid URI, I cannot serialize this as N3/Turtle. Perhaps you wanted to urlencode it?
{"@context": {"example":"http://example.com/"}, "@id": "example:with space:", "example:key": "value"}
Hi everyone. I have a question concerning the returned @context
when framing.
I could find that for compact, on the JsonLdProcessor 9.3 says:
If context was not null, add an @context entry to compacted output and set its value to the provided context.
But I could not find anything similar in framing. So If I pass the following json
{
"@id": "http://schema.org/myId",
"@type": "http://schema.org/mytype"
}
With the following framing:
{
"@id": "http://schema.org/myId",
"@context": "http://schema.org/"
}
Where in the algorithm says if I should expect the response to contain the same @context
as the framing or the resolved @context
(so all the schema.org context) ?
Json-LD Java
present here? I’d like them to review&merge the PR that fixes an issue with recursive remoteContexts: jsonld-java/jsonld-java#303
{
"@id" : "Model 1",
"@type" : "abc:model",
"entities" : [
{
"@id" : "Entity 1",
"@type" : "abc:entitiy",
"attributes" : [
{
"@id" : "Attribute 1",
"@type" : "abc:attribute"
}
]
}
]
}
So I think in part the issue is that the logic in RDFLib is not this:
https://www.w3.org/TR/json-ld11/#type-coercion
If no matching term is found in the active context, it tries to expand it as an IRI or a compact IRI if there's a colon in the value; otherwise, it will expand the value using the active context's vocabulary mapping, if present. Values coerced to @id in contrast are expanded as an IRI or a compact IRI if a colon is present; otherwise, they are interpreted as relative IRI references.
.
@_comment
for now