pyld
pyld copied to clipboard
issue with jsonld.normalize().
I was trying to run sign/verify on the same jsonld samples from https://github.com/digitalbazaar/vc-demo/blob/master/credentials/alumni.jsonld in python.
While trying to run jsonld.normalize() I am getting errors.
Traceback (most recent call last):
File "/home/amar/work/test/certapp-test/jsonld.py", line 1134, in to_rdf
expanded = self.expand(input_, options)
File "/home/amar/work/test/certapp-test/jsonld.py", line 835, in expand
expanded = self._expand(active_ctx, None, document, options, False)
File "/home/amar/work/test/certapp-test/jsonld.py", line 2090, in _expand
active_ctx, element['@context'], options)
File "/home/amar/work/test/certapp-test/jsonld.py", line 2833, in _process_context
self._create_term_definition(rval, ctx, k, defined)
File "/home/amar/work/test/certapp-test/jsonld.py", line 4345, in _create_term_definition
{'context': local_ctx}, code='invalid term definition')
jsonld.JsonLdError: ('Invalid JSON-LD syntax; @context property values must be strings or objects.',)
Type: jsonld.SyntaxError
Code: invalid term definition
Those examples are not likely to work at the moment since PyLD doesn't yet support the latest 1.1 spec. Full 1.1 support is a work in progress.
Thanks for confirming.
PyLD 2.0.0 has been released. It should be able to handle those examples.