Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. General Discussion
  3. 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.

Scheduled Pinned Locked Moved General Discussion
activitypub
13 Posts 5 Posters 1 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • evan@cosocial.caE
    evan@cosocial.caE
    evan@cosocial.ca
    wrote on last edited by
    #1

    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

    trwnh@mastodon.socialT 1 Reply Last reply
    0
    • evan@cosocial.caE evan@cosocial.ca

      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

      trwnh@mastodon.socialT
      trwnh@mastodon.socialT
      trwnh@mastodon.social
      wrote on last edited by
      #2

      @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@cosocial.caE 1 Reply Last reply
      0
      • trwnh@mastodon.socialT trwnh@mastodon.social

        @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@cosocial.caE
        evan@cosocial.caE
        evan@cosocial.ca
        wrote on last edited by
        #3

        @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.

        hongminhee@hollo.socialH steve@social.technoetic.comS 2 Replies Last reply
        0
        • evan@cosocial.caE evan@cosocial.ca

          @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.

          hongminhee@hollo.socialH
          hongminhee@hollo.socialH
          hongminhee@hollo.social
          wrote on last edited by
          #4

          @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!

          evan@cosocial.caE 1 Reply Last reply
          0
          • hongminhee@hollo.socialH hongminhee@hollo.social

            @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!

            evan@cosocial.caE
            evan@cosocial.caE
            evan@cosocial.ca
            wrote on last edited by
            #5

            @hongminhee Thanks for doing it!

            1 Reply Last reply
            0
            • evan@cosocial.caE evan@cosocial.ca

              @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.

              steve@social.technoetic.comS
              steve@social.technoetic.comS
              steve@social.technoetic.com
              wrote on last edited by
              #6

              @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..."

              julian@activitypub.spaceJ evan@cosocial.caE 2 Replies Last reply
              0
              • steve@social.technoetic.comS steve@social.technoetic.com

                @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..."

                julian@activitypub.spaceJ
                julian@activitypub.spaceJ
                julian@activitypub.space
                wrote on last edited by
                #7

                @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.

                1000013077.png

                steve@social.technoetic.comS 1 Reply Last reply
                0
                • julian@activitypub.spaceJ julian@activitypub.space

                  @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.

                  1000013077.png

                  steve@social.technoetic.comS
                  steve@social.technoetic.comS
                  steve@social.technoetic.com
                  wrote on last edited by
                  #8

                  @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.

                  1 Reply Last reply
                  0
                  • steve@social.technoetic.comS steve@social.technoetic.com

                    @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@cosocial.caE
                    evan@cosocial.caE
                    evan@cosocial.ca
                    wrote on last edited by
                    #9

                    @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@cosocial.caE 1 Reply Last reply
                    0
                    • evan@cosocial.caE evan@cosocial.ca

                      @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@cosocial.caE
                      evan@cosocial.caE
                      evan@cosocial.ca
                      wrote on last edited by
                      #10

                      @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.

                      @steve @trwnh @hongminhee @jasnell

                      julian@activitypub.spaceJ 1 Reply Last reply
                      0
                      • evan@cosocial.caE evan@cosocial.ca

                        @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.

                        @steve @trwnh @hongminhee @jasnell

                        julian@activitypub.spaceJ
                        julian@activitypub.spaceJ
                        julian@activitypub.space
                        wrote on last edited by
                        #11

                        @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.

                        evan@cosocial.caE 1 Reply Last reply
                        0
                        • julian@activitypub.spaceJ julian@activitypub.space

                          @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.

                          evan@cosocial.caE
                          evan@cosocial.caE
                          evan@cosocial.ca
                          wrote on last edited by
                          #12

                          @julian I already have access to the package. I'd been squatting in his GitHub namespace for too long anyway.

                          evan@cosocial.caE 1 Reply Last reply
                          0
                          • evan@cosocial.caE evan@cosocial.ca

                            @julian I already have access to the package. I'd been squatting in his GitHub namespace for too long anyway.

                            evan@cosocial.caE
                            evan@cosocial.caE
                            evan@cosocial.ca
                            wrote on last edited by
                            #13

                            @julian anyways, moved and shipped!

                            https://www.npmjs.com/package/activitystrea.ms

                            1 Reply Last reply
                            0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better πŸ’—

                            Register Login
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            Powered by NodeBB Contributors
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups