We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON-LD does not correctly process stdin when supplied with -.
-
echo '{"@context": { "@vocab": "http://xmlns.com/foaf/0.1/" }, "@id": "http://example.com", "name": "Example"}' | rdfpipe -i json-ld -o turtle -
$ echo '{"@context": { "@vocab": "http://xmlns.com/foaf/0.1/" }, "@id": "http://example.com", "name": "Example"}' | rdfpipe -i json-ld -o turtle - @prefix : <http://xmlns.com/foaf/0.1/> . <http://example.com/> :name "Example" .
$ echo '{"@context": { "@vocab": "http://xmlns.com/foaf/0.1/" }, "@id": "http://example.com", "name": "Example"}' | rdfpipe -i json-ld -o turtle - 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 51, in parse_and_serialize graph.parse(fpath, format=use_format, **kws) File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/graph.py", line 1549, in parse context.parse(source, publicID=publicID, format=format, **args) File "/home/iwana/.local/lib/python3.8/site-packages/rdflib/graph.py", line 1078, in parse parser.parse(source, self, **args) File "/home/iwana/.local/lib/python3.8/site-packages/rdflib_jsonld/parser.py", line 83, in parse data = source_to_json(source) File "/home/iwana/.local/lib/python3.8/site-packages/rdflib_jsonld/util.py", line 28, in source_to_json return json.load(StringIO(stream.read().decode('utf-8'))) AttributeError: 'str' object has no attribute 'decode'
Specify /dev/stdin instead of -
/dev/stdin
$ echo '{"@context": { "@vocab": "http://xmlns.com/foaf/0.1/" }, "@id": "http://example.com", "name": "Example"}' | rdfpipe -i json-ld -o turtle /dev/stdin @prefix : <http://xmlns.com/foaf/0.1/> . <http://example.com/> :name "Example" .
The text was updated successfully, but these errors were encountered:
Duplicate of #91
Sorry, something went wrong.
Thanks, closing this then.
No branches or pull requests
JSON-LD does not correctly process stdin when supplied with
-
.Test case:
Expected result:
Actual result:
Workaround
Specify
/dev/stdin
instead of-
The text was updated successfully, but these errors were encountered: