Skip to content

jsonld.js and JSON-LD Playground deliver different compacted results #201

@nitmws

Description

@nitmws

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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions