Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Invalid JSON-LD context #107

@zotanmew

Description

@zotanmew

Heya, a.gup.pe is not generating a valid JSON-LD context. According to the specification, redefining keywords is not permitted.

If you fetch the outbox of any guppe group (or receive an activity from guppe), the context will look something like this:

  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "@context": {
        "PropertyValue": "http://schema.org/#PropertyValue"
      }
    }
  ]

The nested @context causes every JSON-LD compliant parser to throw an exception. Since I presume you simply wanted to add the term definition for PropertyValue, the context should look like this instead:

  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "PropertyValue": "http://schema.org/#PropertyValue"
    }
  ]

I don't know the details of the ActivitypubExpress library, as used here:

guppe/index.js

Line 54 in 7d44a6d

context: require('./data/context.json'),

But I presume the issue lies here:

{
"@context": {
"PropertyValue" : "http://schema.org/#PropertyValue"
}
}

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