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.
-
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:
@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) -
@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)@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.
-
@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.
@evan@cosocial.ca @trwnh@mastodon.social I'm maintaining the
@fedify/vocabpackage which depends on thejsonldpackage from Digital Bazaar. It's written in 100% TypeScript, and has worked well on production services! -
@evan@cosocial.ca @trwnh@mastodon.social I'm maintaining the
@fedify/vocabpackage which depends on thejsonldpackage from Digital Bazaar. It's written in 100% TypeScript, and has worked well on production services!@hongminhee Thanks for doing it!
-
@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.
@evan @trwnh @hongminhee I think he was referring to the GitHub project description: "Activity Streams 2.0 for Node.js (this package is not actively maintained..."
-
@evan @trwnh @hongminhee I think he was referring to the GitHub project description: "Activity Streams 2.0 for Node.js (this package is not actively maintained..."
@steve@social.technoetic.com @trwnh@mastodon.social we shouldn't stop using software just because they're no longer maintained.
I believe request is no longer maintained, in favour of native node fetch, but good god would you look at those downloads.

-
@julian @trwnh Your point isn't clear to me. Of course, people are free to use unmaintained software (even if I personally prefer to avoid software that's been deprecated and not maintained for years). However, in this case, the activitystrea.ms software *is* maintained although it describes itself otherwise.
-
@evan @trwnh @hongminhee I think he was referring to the GitHub project description: "Activity Streams 2.0 for Node.js (this package is not actively maintained..."
@steve @trwnh @hongminhee ha! That was the notice that got me to become a maintainer. But I don't have the admin rights to change it!
@jasnell can you give admin rights on the activitystrea.ms repo so I can change the message and also push automatically?
-
@steve @trwnh @hongminhee ha! That was the notice that got me to become a maintainer. But I don't have the admin rights to change it!
@jasnell can you give admin rights on the activitystrea.ms repo so I can change the message and also push automatically?
@evan James archived the repo today, assumably in response to this question. I'm going to keep working from my personal fork, and I'll use that to push to npm. I think I can update the info in package.json on the topic, too. A change that's been waiting too long.
-
@evan James archived the repo today, assumably in response to this question. I'm going to keep working from my personal fork, and I'll use that to push to npm. I think I can update the info in package.json on the topic, too. A change that's been waiting too long.
@evan@cosocial.ca that seems odd, instead of transferring it to you or SWF

Did you get access to the npm package? Or perhaps you'll have to use a scoped package name.