-
Notifications
You must be signed in to change notification settings - Fork 210
Description
I'm setting up a simple transformer from Turtle RDF to JSON-LD using this jsonld.js node module.
The expanded JSON-LD is ok: https://raw.githubusercontent.com/nitmws/rdf-jsonld-transformation-test1/master/testdata/sample069x.json
Then jsonld.compact(doc, context, {skipExpansion : true}, ... is executed
- compact is read from https://raw.githubusercontent.com/nitmws/rdf-jsonld-transformation-test1/master/ODRL22.jsonld
- output: https://github.com/nitmws/rdf-jsonld-transformation-test1/blob/master/testdata/sample069x%3Dcompact.json
which includes "undefined" properties - this should not be the case.
Using the expanded JSON-LD and the context object with the JSON-LD Playground shows a better result: the "undefined" properties are "uid" properties as it should be the case. (https://json-ld.org/playground/#startTab=tab-compacted&json-ld=https%3A%2F%2Fraw.githubusercontent.com%2Fnitmws%2Frdf-jsonld-transformation-test1%2Fmaster%2Ftestdata%2Fsample069x.json&context=https%3A%2F%2Fraw.githubusercontent.com%2Fnitmws%2Frdf-jsonld-transformation-test1%2Fmaster%2Ftestdata%2Fsample069x%253Dcompact.json)
Simple question: what makes the difference?