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. In ActivityPub, these are all equivalent:

In ActivityPub, these are all equivalent:

Scheduled Pinned Locked Moved Uncategorized
activitypubactivitystreamsfedidevjsonld
10 Posts 4 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.
  • reiver@mastodon.socialR This user is from outside of this forum
    reiver@mastodon.socialR This user is from outside of this forum
    reiver@mastodon.social
    wrote last edited by
    #1

    In ActivityPub, these are all equivalent:

    "type":"Banana"

    "type":["Banana"]

    "type":{"@id":"Banana"}

    "type":[{"@id":"Banana"}]

    "type":{"id":"Banana"}

    "type":[{"id":"Banana"}]

    "@type":"Banana"

    "@type":["Banana"]

    "@type":{"@id":"Banana"}

    "@type":[{"@id":"Banana"}]

    "@type":{"id":"Banana"}

    "@type":[{"id":"Banana"}]

    #ActivityPub #ActivityStreams #FediDev #JSONLD

    oliviavespera@spacey.spaceO steve@social.technoetic.comS 2 Replies Last reply
    0
    • reiver@mastodon.socialR reiver@mastodon.social

      In ActivityPub, these are all equivalent:

      "type":"Banana"

      "type":["Banana"]

      "type":{"@id":"Banana"}

      "type":[{"@id":"Banana"}]

      "type":{"id":"Banana"}

      "type":[{"id":"Banana"}]

      "@type":"Banana"

      "@type":["Banana"]

      "@type":{"@id":"Banana"}

      "@type":[{"@id":"Banana"}]

      "@type":{"id":"Banana"}

      "@type":[{"id":"Banana"}]

      #ActivityPub #ActivityStreams #FediDev #JSONLD

      oliviavespera@spacey.spaceO This user is from outside of this forum
      oliviavespera@spacey.spaceO This user is from outside of this forum
      oliviavespera@spacey.space
      wrote last edited by
      #2

      @reiver That's... kinda shite.

      trwnh@mastodon.socialT 1 Reply Last reply
      0
      • reiver@mastodon.socialR reiver@mastodon.social

        In ActivityPub, these are all equivalent:

        "type":"Banana"

        "type":["Banana"]

        "type":{"@id":"Banana"}

        "type":[{"@id":"Banana"}]

        "type":{"id":"Banana"}

        "type":[{"id":"Banana"}]

        "@type":"Banana"

        "@type":["Banana"]

        "@type":{"@id":"Banana"}

        "@type":[{"@id":"Banana"}]

        "@type":{"id":"Banana"}

        "@type":[{"id":"Banana"}]

        #ActivityPub #ActivityStreams #FediDev #JSONLD

        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
        #3

        @reiver That's assuming "Banana" is a term defined in the JSON-LD context. Even then, the expanded "Banana" term (e.g., "https://server.example/fruits#Banana" is also valid and equivalent.

        reiver@mastodon.socialR trwnh@mastodon.socialT 2 Replies Last reply
        0
        • steve@social.technoetic.comS steve@social.technoetic.com

          @reiver That's assuming "Banana" is a term defined in the JSON-LD context. Even then, the expanded "Banana" term (e.g., "https://server.example/fruits#Banana" is also valid and equivalent.

          reiver@mastodon.socialR This user is from outside of this forum
          reiver@mastodon.socialR This user is from outside of this forum
          reiver@mastodon.social
          wrote last edited by
          #4

          @steve

          Yes, you are correct, all those are equivalent, too.

          Plus any CURIE form (ex: abc:Banana).

          I couldn't fit all those in the 500 character limit.

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

            @reiver That's assuming "Banana" is a term defined in the JSON-LD context. Even then, the expanded "Banana" term (e.g., "https://server.example/fruits#Banana" is also valid and equivalent.

            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
            #5

            @steve @reiver See https://github.com/w3c/json-ld-syntax/issues/446 for a related issue. JSON-LD @\type IRIs get expanded against a @\vocab prefix, or if one is not present then they get expanded against the @\base, and if *that* can't be determined then they are actually not expanded.

            However, you don't have to worry about cases like "@type":{"@id":"Banana"} because those are not valid. Per https://www.w3.org/TR/json-ld11/#specifying-the-type you only have to worry about strings and arrays of strings.

            Also AS2 compacts @\type to type.

            trwnh@mastodon.socialT 1 Reply Last reply
            0
            • trwnh@mastodon.socialT trwnh@mastodon.social

              @steve @reiver See https://github.com/w3c/json-ld-syntax/issues/446 for a related issue. JSON-LD @\type IRIs get expanded against a @\vocab prefix, or if one is not present then they get expanded against the @\base, and if *that* can't be determined then they are actually not expanded.

              However, you don't have to worry about cases like "@type":{"@id":"Banana"} because those are not valid. Per https://www.w3.org/TR/json-ld11/#specifying-the-type you only have to worry about strings and arrays of strings.

              Also AS2 compacts @\type to type.

              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
              #6

              @steve @reiver So really, those 12 cases reduce to only the first 2.

              steve@social.technoetic.comS 1 Reply Last reply
              0
              • oliviavespera@spacey.spaceO oliviavespera@spacey.space

                @reiver That's... kinda shite.

                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
                #7

                @OliviaVespera @reiver It's also not correct; only the first 2 cases are valid/compliant. (If ActivityPub didn't define "type" to mean @\type, then it would be only the 7th and 8th cases in that list.)

                reiver@mastodon.socialR 1 Reply Last reply
                0
                • trwnh@mastodon.socialT trwnh@mastodon.social

                  @steve @reiver So really, those 12 cases reduce to only the first 2.

                  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

                  @trwnh @reiver The classic example of this issue is a property like `attributedTo` or its subproperty `actor` (just two of many examples). The range is Object|Link. That means the property value could be URI, an Object, a Link or an array (set) of any combination of URIs, Objects or Links where the URI could be compacted, expanded or a CURIE.

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

                    @trwnh @reiver The classic example of this issue is a property like `attributedTo` or its subproperty `actor` (just two of many examples). The range is Object|Link. That means the property value could be URI, an Object, a Link or an array (set) of any combination of URIs, Objects or Links where the URI could be compacted, expanded or a CURIE.

                    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
                    #9

                    @steve @reiver Yup. Makes me wish we used an actual normal/canonical form that was more constrained. Even in the AS2 context I've oft thought @\type: @\id could be a mistake since {id: foo} is usually preferable; also, any non-functional property really ought to be @\container: @\set. those would be backwards-incompatible changes, though. and even if someone defined a simpler easier-to-understand profile, what's the point if people don't use it?

                    1 Reply Last reply
                    0
                    • trwnh@mastodon.socialT trwnh@mastodon.social

                      @OliviaVespera @reiver It's also not correct; only the first 2 cases are valid/compliant. (If ActivityPub didn't define "type" to mean @\type, then it would be only the 7th and 8th cases in that list.)

                      reiver@mastodon.socialR This user is from outside of this forum
                      reiver@mastodon.socialR This user is from outside of this forum
                      reiver@mastodon.social
                      wrote last edited by
                      #10

                      @trwnh @OliviaVespera

                      Why do you feel that the 7th & 8th cases are not "valid"?

                      "@type":"Banana"

                      "@type":["Banana"]

                      ...

                      At the following, "type" is set as an alias for "@type":

                      https://www.w3.org/ns/activitystreams.jsonld

                      But, AFAICT, in JSON-LD creating an alias (such as "type") does not make the original form (such as "@type") invalid.

                      Are you claiming the 7th & 8th form are invalid JSON-LD?

                      Or, are you claiming the 7th & 8th form are valid JSON-LD, but invalid ActivityPub?

                      Or, something else?

                      1 Reply Last reply
                      1
                      0
                      • R relay@relay.mycrowd.ca shared this topic
                      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