Home

Conversation

$$21399
https://cosocial.ca/users/evan posted on Apr 1, 2026 23:17

I think if there's one thing I'd say to #ActivityPub developers, it's this: it seems like it's going to be easier to just parse Activity Streams 2.0 data as plain JSON, but it's not. You have to keep track of too many variations. Use a JSON-LD library instead. For JavaScript, try activitystrea.ms:

https://github.com/jasnell/activitystrea.ms

https://cosocial.ca/users/evan/statuses/116332001773753660
Reply
$$21466
https://mastodon.social/users/trwnh posted on Apr 2, 2026 07:02
In reply to: https://cosocial.ca/users/evan/statuses/116332001773753660

@evan i would add that there are several other more actively maintained options, at least: https://json-ld.org/#developers

in the most basic case, expanding the document should make it unambiguous:

- all keys are normalized to full identifiers with exactly 1 possible representation instead of infinitely many
- all values are normalized to JSON
arrays of JSON objects
- those JSON objects explicitly say whether they have an id (Reference) or a value (Literal)

https://mastodon.social/users/trwnh/statuses/116333828835838324
Reply
$$21507
https://cosocial.ca/users/evan posted on Apr 2, 2026 12:51
In reply to: https://mastodon.social/users/trwnh/statuses/116333828835838324

@trwnh "more actively maintained"?

The code is long-term but it was built by one author of AS2 and maintained by the other. It works well, and I use it in production systems all the time.

I'm pretty sure @hongminhee has made a similar package, although I'm not sure it's distributed independently.

https://cosocial.ca/users/evan/statuses/116335199274721737
Reply
$$21512
https://hollo.social/@hongminhee posted on Apr 2, 2026 13:01
In reply to: https://cosocial.ca/users/evan/statuses/116335199274721737

@evan@cosocial.ca @trwnh@mastodon.social I’m maintaining the @fedify/vocab package which depends on the jsonld package from Digital Bazaar. It’s written in 100% TypeScript, and has worked well on production services!

https://hollo.social/@hongminhee/019d4e48-b607-7523-a2a0-f1e0cf6b4670
Reply