Skip to content

property-scoped context should not be protected #404

Closed
@Fak3

Description

@Fak3

JSON LD spec says:

a property-scoped context is not affected by protection, and can therefore override protected terms, either with a new term definition, or by clearing the context with "@context": null.

I tried this example in the json playground: https://tinyurl.com/y7wuexzb

{
  "@context": [
    {
        "@version": 1.1,
        "@protected": true,
        "issuer": {"@id": "https://www.w3.org/2018/credentials#issuer", "@type": "@id"}
    },
	{
      "issuer": {
        "@id": "https://www.w3.org/2018/credentials#issuer", "@type": "@id",
        "@context": { "name": "http://example.org/name" }
      }
  	}
  ],
  "type": ["VerifiableCredential"],
  "issuer": {
    "name": "My issuer"
  }
}

This resulted in error: jsonld.SyntaxError: Invalid JSON-LD syntax; tried to redefine a protected term.

The expected behavior according to the JSON-LD scpec is to allow redefenition of property-scoped context of a protect term.

The same error is thrown on attempt to use Verifiable Credentials context.

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