Skip to content

Expansion/normalization with nested context differs from jsonld.js #230

@pduchesne

Description

@pduchesne

The expansion of terms that are in the scope of a nested context does not seem to take into account definitions from the parent context.

While I'm not familiar enough with the expansion algorithm to know whether that behaviour is correct, it certainly differs from the jsonld.js implementation.
As we are using both libraries in a usecase involving Verifiable Credentials signing, reproducible normalization (and therefore reproducible expansion) across platforms is crucial.

The problem is reproduced here with a minimal document :
https://colab.research.google.com/drive/1QoZ4o8DCNpJshR-c8SbaREKnrMg1VAt0

The same document can be tested in the jsonld playground : https://tinyurl.com/2dfr3w27
where the difference in expansion and normalization can be observed.

The python notebook contains two commented out lines in the nested context that fix the problem, but of course it would be expected that both libraries behave the same way with the same input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions