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 hope more #ActivityPub implementations start properly handling JSON-LD documents in various forms, rather than using ad-hoc approaches like only allowing specific fields to accept both arrays and scalar values.

I hope more #ActivityPub implementations start properly handling JSON-LD documents in various forms, rather than using ad-hoc approaches like only allowing specific fields to accept both arrays and scalar values.

Scheduled Pinned Locked Moved Uncategorized
activitypub
26 Posts 10 Posters 104 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.
  • mariusor@metalhead.clubM mariusor@metalhead.club

    @silverpill I do not bow to the Mastodon imperialism.

    @hongminhee

    django@social.coopD This user is from outside of this forum
    django@social.coopD This user is from outside of this forum
    django@social.coop
    wrote last edited by
    #21

    @silverpill @mariusor @hongminhee

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

      @hongminhee the activitystrea.ms library does a pretty good job of parsing and generating AS2, in a uniform way. It pushes you into better habits, which I appreciate.

      My book does bare-JSON parsing in all the major examples; I should probably change it in the next version.

      Should we start a page for JSON-LD-based AS2 libraries? I think @cwebber did a good Python one, and there may be others.

      darius@friend.campD This user is from outside of this forum
      darius@friend.campD This user is from outside of this forum
      darius@friend.camp
      wrote last edited by
      #22

      @evan @hongminhee yes I think we should!

      1 Reply Last reply
      1
      0
      • 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
        #23

        @hongminhee It's subtly more messed up than that. AP didn't explicitly allow all 3, but it calls out in a non-normative note that implementers may produce non-canonical serializations.

        Right now, as:Public is canonical. Public would be canonical if properties like to/cc/audience were vocab-relative, but they aren't (and shouldn't be). Undefining the as: prefix results in the full URI being canonical.

        I think introducing a vocab relative term for visibility could make sense, using Public.

        1 Reply Last reply
        2
        0
        • profpatsch@mastodon.xyzP This user is from outside of this forum
          profpatsch@mastodon.xyzP This user is from outside of this forum
          profpatsch@mastodon.xyz
          wrote last edited by
          #24

          @hongminhee @jamie why do we need this kind of complication? What's wrong with just always expecting an array and simplifying the standard instead?

          1 Reply Last reply
          2
          0
          • ? Guest

            @hongminhee

            Why don't you fix your software instead?

            It sounds like you're referring to this issue:

            Link Preview Image
            [Federation]: `Create(Note)` with a single attachment is dropped because `Helpers::verifyAttachments` still assumes `attachment` is an array (follow-up to #6427) · Issue #6588 · pixelfed/pixelfed

            Description PR #6427 made handleCreateActivity accept the JSON-LD 1.1 compact form of to/cc (single value instead of a one-element array). The same compaction rule applies to every set-valued property in Activity Streams 2.0, and one of ...

            favicon

            GitHub (github.com)

            But in Fediverse, attachment is not supposed to be an object, it's an array.

            I don't think you should expect people to comply with your vision of ActivityPub.

            profpatsch@mastodon.xyzP This user is from outside of this forum
            profpatsch@mastodon.xyzP This user is from outside of this forum
            profpatsch@mastodon.xyz
            wrote last edited by
            #25

            @silverpill @hongminhee why do we need this kind of complication? What's wrong with just always expecting an array and simplifying the standard instead?

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

              @mariusor @silverpill @hongminhee yeah, that's definitely not what the spec says.

              "The serialized JSON form of an Activity Streams 2.0 document MUST be consistent with what would be produced by the standard JSON-LD 1.0 Processing Algorithms and API [JSON-LD-API] Compaction Algorithm"

              profpatsch@mastodon.xyzP This user is from outside of this forum
              profpatsch@mastodon.xyzP This user is from outside of this forum
              profpatsch@mastodon.xyz
              wrote last edited by
              #26

              @evan @mariusor @silverpill @hongminhee I can't wait for us to finally drop jsonld in a living standard

              1 Reply Last reply
              2
              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