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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  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 Uncategorized
activitypub
11 Posts 5 Posters 0 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.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 This user is from outside of this forum
    trwnh@mastodon.socialT This user is from outside of this forum
    trwnh@mastodon.social
    wrote 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 This user is from outside of this forum
      evan@cosocial.caE This user is from outside of this forum
      evan@cosocial.ca
      wrote 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 This user is from outside of this forum
        hongminhee@hollo.socialH This user is from outside of this forum
        hongminhee@hollo.social
        wrote 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 This user is from outside of this forum
          evan@cosocial.caE This user is from outside of this forum
          evan@cosocial.ca
          wrote 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 This user is from outside of this forum
            steve@social.technoetic.comS This user is from outside of this forum
            steve@social.technoetic.com
            wrote 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 This user is from outside of this forum
              julian@activitypub.spaceJ This user is from outside of this forum
              julian@activitypub.space
              wrote 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

              1 Reply Last reply
              1
              0
              • steve@social.technoetic.comS This user is from outside of this forum
                steve@social.technoetic.comS This user is from outside of this forum
                steve@social.technoetic.com
                wrote 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 This user is from outside of this forum
                  evan@cosocial.caE This user is from outside of this forum
                  evan@cosocial.ca
                  wrote 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
                  1
                  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 This user is from outside of this forum
                    evan@cosocial.caE This user is from outside of this forum
                    evan@cosocial.ca
                    wrote 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
                    1
                    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 This user is from outside of this forum
                      julian@activitypub.spaceJ This user is from outside of this forum
                      julian@activitypub.space
                      wrote 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.

                      1 Reply Last reply
                      1
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

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