question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ActivityStreams context URL doesn't resolve to JSON-LD

See original GitHub issue

I’m trying to sign an ActivityStreams document, but it only works if I add .jsonld to the @context URL (https://www.w3.org/ns/activitystreams.jsonld). Is this intended behavior, or should the library automatically resolve to the JSON-LD document based on the URL https://www.w3.org/ns/activitystreams?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DePasqualeOrgcommented, Feb 1, 2022

Fantastic, thanks! I’ve updated the gist to demonstrate what I think is the correct usage. Feel free to add this to your code examples if you like. Maybe that will help more people like me get started in this space.

0reactions
dlongleycommented, Feb 1, 2022

The code there adds the activity streams context as a static context using this key:

'https://www.w3.org/ns/activitystreams.jsonld' https://gist.github.com/DePasqualeOrg/c12f34720cf27dc31183c938ac1e1c0d#file-main-js-L13

Just change that to remove .jsonld and then when the doc loader looks for 'https://www.w3.org/ns/activitystreams' it should find the static context you registered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not retrieve a JSON-LD document from the URL. #133
Type: jsonld.InvalidUrl Code: loading remote context failed Details: {'url': 'https://www.w3.org/ns/activitystreams', 'cause': JsonLdError ...
Read more >
ActivityStreams context document - ActivityPub - SocialHub
Where can I find the JSON-LD context document for ActivityStreams? So far I've just been able to find this one on GitHub, but...
Read more >
Can JSON-LD "@id" be used to link to an item described on ...
In JSON-LD, a node is identified using the @id keyword. This probably means that there is no limit to using this element.
Read more >
Activity Streams 2.0 - W3C
Abstract. This specification details a model for representing potential and completed activities using the JSON format.
Read more >
SwissDataScienceCenter/calamus - Gitter
But with it, I get the benefit of properly processing json-ld and who knows what ... I'd honestly be fine for now to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found