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. Fediverse
  3. Fedi
  4. I have deeply mixed feelings about #ActivityPub's adoption of JSON-LD, as someone who's spent way too long dealing with it while building #Fedify.

I have deeply mixed feelings about #ActivityPub's adoption of JSON-LD, as someone who's spent way too long dealing with it while building #Fedify.

Scheduled Pinned Locked Moved Fedi
fedifyjsonldfedidevactivitypub
82 Posts 19 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.
  • sl007@digitalcourage.socialS sl007@digitalcourage.social

    @kopper @julian @hongminhee

    incl.
    - the properties in all the languages of the world
    - the knowledge of the world in all the languages
    - the wikidata relations and qualified statements including the nameMap etc. and all the urls to all wikiprojects incl. their languages and knowledge

    How else could I say to other softwares if they want all users qualified data, use wikidata vocabulary?
    wikipedia, wikidata, EBU, Public Broadcasters, taxi data is _all_ JSON-LD …

    kopper@not-brain.d.on-t.workK This user is from outside of this forum
    kopper@not-brain.d.on-t.workK This user is from outside of this forum
    kopper@not-brain.d.on-t.work
    wrote last edited by
    #56
    @sl007 @hongminhee @julian i feel like you're falling into a trap i've seen a lot around AP spaces: just because the data can be contorted to represent something does not mean software will interpret it as such.

    any software who wants to support wikidata statements and relations will have to go out of their way to implement that manually with or without json-ld in the mix, and interoperability between those software will have to specify how that works. and in your specification you can indeed make it so Simply Linking to the wikidata json-ld (which i don't believe it provides out of the box, it does for xml, turtle, and n-triples, if we're talking about rdf. if not,
    their bespoke json format is just as authoritative) can work (but i'd say using the Qxxx and Pxx IDs and letting the software figure out how to access it would be better!)

    if you have the dream of making an as:Note and having it's as:attributedTo be the wikidata entity for alan turing... sorry, nobody other than maybe your own software will even attempt interpreting that
    kopper@not-brain.d.on-t.workK sl007@digitalcourage.socialS 2 Replies Last reply
    0
    • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
      @sl007 @hongminhee @julian i feel like you're falling into a trap i've seen a lot around AP spaces: just because the data can be contorted to represent something does not mean software will interpret it as such.

      any software who wants to support wikidata statements and relations will have to go out of their way to implement that manually with or without json-ld in the mix, and interoperability between those software will have to specify how that works. and in your specification you can indeed make it so Simply Linking to the wikidata json-ld (which i don't believe it provides out of the box, it does for xml, turtle, and n-triples, if we're talking about rdf. if not,
      their bespoke json format is just as authoritative) can work (but i'd say using the Qxxx and Pxx IDs and letting the software figure out how to access it would be better!)

      if you have the dream of making an as:Note and having it's as:attributedTo be the wikidata entity for alan turing... sorry, nobody other than maybe your own software will even attempt interpreting that
      kopper@not-brain.d.on-t.workK This user is from outside of this forum
      kopper@not-brain.d.on-t.workK This user is from outside of this forum
      kopper@not-brain.d.on-t.work
      wrote last edited by
      #57
      @hongminhee @sl007 @julian attempting to support this kind of "data contortion" (i made this up and prolly isnt the right way to describe this) would rapidly balloon the scope of every fedi software ever. i don't believe anyone would want to develop for such ecosystem

      a similar example i saw was someone attempting to explain how you can partially inline an as:object you as:Like'd in order to specify you only liked that past version of it and if it changed your like shouldn't count. without describing this exact scenario i don't believe any software, json-ld capable or not, would interpret that Like as such. same thing with the long-form text FEP which attempts to support non-activitypub authors
      sl007@digitalcourage.socialS 2 Replies Last reply
      0
      • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
        @sl007 @hongminhee @julian i feel like you're falling into a trap i've seen a lot around AP spaces: just because the data can be contorted to represent something does not mean software will interpret it as such.

        any software who wants to support wikidata statements and relations will have to go out of their way to implement that manually with or without json-ld in the mix, and interoperability between those software will have to specify how that works. and in your specification you can indeed make it so Simply Linking to the wikidata json-ld (which i don't believe it provides out of the box, it does for xml, turtle, and n-triples, if we're talking about rdf. if not,
        their bespoke json format is just as authoritative) can work (but i'd say using the Qxxx and Pxx IDs and letting the software figure out how to access it would be better!)

        if you have the dream of making an as:Note and having it's as:attributedTo be the wikidata entity for alan turing... sorry, nobody other than maybe your own software will even attempt interpreting that
        sl007@digitalcourage.socialS This user is from outside of this forum
        sl007@digitalcourage.socialS This user is from outside of this forum
        sl007@digitalcourage.social
        wrote last edited by
        #58

        @kopper

        ah, no - that is a misunderstanding!

        Anyone can feel free to represent the texts only and the user at least "knows" it.
        But the thing for Public Broadcasters means 47mio. users in DE alone and given the unified codebase for the 5 projects _these_ softwares will interpret it.
        It does JSON-LD you could just check by asking for any JSON-LD e.g. Q1055 (Hamburg) - it is content-negotiation.
        The taxiteam software is funded by the German yellow cabs - the official ones (!) the codename is FCKUBR 😉 and I have no doubt about adoption fortunately.

        Maybe we can work out better examples …

        @hongminhee @julian

        1 Reply Last reply
        0
        • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
          @hongminhee @sl007 @julian attempting to support this kind of "data contortion" (i made this up and prolly isnt the right way to describe this) would rapidly balloon the scope of every fedi software ever. i don't believe anyone would want to develop for such ecosystem

          a similar example i saw was someone attempting to explain how you can partially inline an as:object you as:Like'd in order to specify you only liked that past version of it and if it changed your like shouldn't count. without describing this exact scenario i don't believe any software, json-ld capable or not, would interpret that Like as such. same thing with the long-form text FEP which attempts to support non-activitypub authors
          sl007@digitalcourage.socialS This user is from outside of this forum
          sl007@digitalcourage.socialS This user is from outside of this forum
          sl007@digitalcourage.social
          wrote last edited by
          #59

          @kopper @hongminhee @julian

          it is just damned simple, your as: Client can do so much by asking wikidata, OSM, federated geocoding and not our system. When you use a property for the first time, the client can cache its names in the languages of the user etc.

          kopper@not-brain.d.on-t.workK 1 Reply Last reply
          0
          • sl007@digitalcourage.socialS sl007@digitalcourage.social

            @kopper @hongminhee @julian

            it is just damned simple, your as: Client can do so much by asking wikidata, OSM, federated geocoding and not our system. When you use a property for the first time, the client can cache its names in the languages of the user etc.

            kopper@not-brain.d.on-t.workK This user is from outside of this forum
            kopper@not-brain.d.on-t.workK This user is from outside of this forum
            kopper@not-brain.d.on-t.work
            wrote last edited by
            #60
            @sl007 @hongminhee @julian i genuinely can't see where json-ld is relevant here. if your client wants to support wikidata and OSM then it can do that with or without json-ld being involved. you are going to have to document how this integration works anyhow if you want anyone else to do so
            sl007@digitalcourage.socialS 1 Reply Last reply
            0
            • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
              @hongminhee @sl007 @julian attempting to support this kind of "data contortion" (i made this up and prolly isnt the right way to describe this) would rapidly balloon the scope of every fedi software ever. i don't believe anyone would want to develop for such ecosystem

              a similar example i saw was someone attempting to explain how you can partially inline an as:object you as:Like'd in order to specify you only liked that past version of it and if it changed your like shouldn't count. without describing this exact scenario i don't believe any software, json-ld capable or not, would interpret that Like as such. same thing with the long-form text FEP which attempts to support non-activitypub authors
              sl007@digitalcourage.socialS This user is from outside of this forum
              sl007@digitalcourage.socialS This user is from outside of this forum
              sl007@digitalcourage.social
              wrote last edited by
              #61

              @kopper @hongminhee @julian

              just btw, we had many W3C Social CG meetings about the importance and how to use the as:context property - not the JSON-LD @context and we all agreed.
              About 30-40 devs attended.
              Between 2016 and 2024 I attended basically any meeting. I felt that using wikidata urls in as:context was nice for anyone.

              julian@activitypub.spaceJ 1 Reply Last reply
              0
              • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
                @sl007 @hongminhee @julian i genuinely can't see where json-ld is relevant here. if your client wants to support wikidata and OSM then it can do that with or without json-ld being involved. you are going to have to document how this integration works anyhow if you want anyone else to do so
                sl007@digitalcourage.socialS This user is from outside of this forum
                sl007@digitalcourage.socialS This user is from outside of this forum
                sl007@digitalcourage.social
                wrote last edited by
                #62

                @kopper @hongminhee @julian

                if I see wd: in lets say 3 of 12 AP software, I know tha I can give the user wikibase support.

                sl007@digitalcourage.socialS 1 Reply Last reply
                0
                • sl007@digitalcourage.socialS sl007@digitalcourage.social

                  @kopper @hongminhee @julian

                  if I see wd: in lets say 3 of 12 AP software, I know tha I can give the user wikibase support.

                  sl007@digitalcourage.socialS This user is from outside of this forum
                  sl007@digitalcourage.socialS This user is from outside of this forum
                  sl007@digitalcourage.social
                  wrote last edited by
                  #63

                  @kopper @hongminhee @julian

                  anyway, if you like RDF and `content` is html how about RDFa ?
                  For us it would work similar. If we have any "convention" before we stop writing it might save time of rewriting 🙂

                  1 Reply Last reply
                  0
                  • sl007@digitalcourage.socialS sl007@digitalcourage.social

                    @kopper @hongminhee @julian

                    just btw, we had many W3C Social CG meetings about the importance and how to use the as:context property - not the JSON-LD @context and we all agreed.
                    About 30-40 devs attended.
                    Between 2016 and 2024 I attended basically any meeting. I felt that using wikidata urls in as:context was nice for anyone.

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

                    @sl007@digitalcourage.social eh? You use context?

                    ForumWG decided to use context to represent threads in threadiverse software (and Mastodon too, now).

                    Just FYI.

                    sl007@digitalcourage.socialS 2 Replies Last reply
                    0
                    • julian@activitypub.spaceJ julian@activitypub.space

                      @sl007@digitalcourage.social eh? You use context?

                      ForumWG decided to use context to represent threads in threadiverse software (and Mastodon too, now).

                      Just FYI.

                      sl007@digitalcourage.socialS This user is from outside of this forum
                      sl007@digitalcourage.socialS This user is from outside of this forum
                      sl007@digitalcourage.social
                      wrote last edited by
                      #65

                      @julian

                      hm, strange. I would really not ignore all the official ActivityPub meetings between 2016 and 2014 🙂 Maybe it would be worth to read the W3C minutes of SocialCG 2019 ff
                      Think, it _should_ have been 2019 or 2021 cause 2021 it wasn't on the "waitlist" anymore :https://socialhub.activitypub.rocks/t/2021-01-09-socialcg-meeting-fep/1246

                      But:
                      It dates back to 2020 https://socialhub.activitypub.rocks/t/context-vs-conversation/578 and after mastodon and pleroma agreed to the us , the 2 Social CG meetings are linked by me in the thread.
                      Then we had the 2020 brilliant Conf.

                      So, well, we use it for ActivityPub spec says and what was decided there by all …

                      mastodon is _not_ able to introduce breaking changes to a W3C standard
                      Just FYI.

                      sl007@digitalcourage.socialS 1 Reply Last reply
                      0
                      • sl007@digitalcourage.socialS sl007@digitalcourage.social

                        @julian

                        hm, strange. I would really not ignore all the official ActivityPub meetings between 2016 and 2014 🙂 Maybe it would be worth to read the W3C minutes of SocialCG 2019 ff
                        Think, it _should_ have been 2019 or 2021 cause 2021 it wasn't on the "waitlist" anymore :https://socialhub.activitypub.rocks/t/2021-01-09-socialcg-meeting-fep/1246

                        But:
                        It dates back to 2020 https://socialhub.activitypub.rocks/t/context-vs-conversation/578 and after mastodon and pleroma agreed to the us , the 2 Social CG meetings are linked by me in the thread.
                        Then we had the 2020 brilliant Conf.

                        So, well, we use it for ActivityPub spec says and what was decided there by all …

                        mastodon is _not_ able to introduce breaking changes to a W3C standard
                        Just FYI.

                        sl007@digitalcourage.socialS This user is from outside of this forum
                        sl007@digitalcourage.socialS This user is from outside of this forum
                        sl007@digitalcourage.social
                        wrote last edited by
                        #66

                        @julian

                        Can you specify "threadiverse" software cause like all properties which are not marked as "functional" in the ActivityPub Spec, `context` is an Array and I do not see any problem …

                        sl007@digitalcourage.socialS 1 Reply Last reply
                        0
                        • julian@activitypub.spaceJ julian@activitypub.space

                          @liaizon@social.wake.st actually, oddly, I did receive @silverpill@mitra.social's response, so it seems to be I can access some replies from Mitra, but not all.

                          ? Offline
                          ? Offline
                          Guest
                          wrote last edited by
                          #67

                          @julian @liaizon https://activitypub.space/uid/1/inbox still returns 404. Perhaps group's inbox is working?

                          UPD: yes https://activitypub.space/category/5/inbox returns 202

                          julian@activitypub.spaceJ 1 Reply Last reply
                          0
                          • ? Guest

                            @julian @liaizon https://activitypub.space/uid/1/inbox still returns 404. Perhaps group's inbox is working?

                            UPD: yes https://activitypub.space/category/5/inbox returns 202

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

                            @silverpill@mitra.social POSTing that inbox sends a 404?

                            ? 1 Reply Last reply
                            0
                            • hongminhee@hollo.socialH hongminhee@hollo.social

                              I have deeply mixed feelings about #ActivityPub's adoption of JSON-LD, as someone who's spent way too long dealing with it while building #Fedify.

                              Part of me wishes it had never happened. A lot of developers jump into ActivityPub development without really understanding JSON-LD, and honestly, can you blame them? The result is a growing number of implementations producing technically invalid JSON-LD. It works, sort of, because everyone's just pattern-matching against what Mastodon does, but it's not correct. And even developers who do take the time to understand JSON-LD often end up hardcoding their documents anyway, because proper JSON-LD processor libraries simply don't exist for many languages. No safety net, no validation, just vibes and hoping you got the @context right. Naturally, mistakes creep in.

                              But then the other part of me thinks: well, we're stuck with JSON-LD now. There's no going back. So wouldn't it be nice if people actually used it properly? Process the documents, normalize them, do the compaction and expansion dance the way the spec intended. That's what Fedify does.

                              Here's the part that really gets to me, though. Because Fedify actually processes JSON-LD correctly, it's more likely to break when talking to implementations that produce malformed documents. From the end user's perspective, Fedify looks like the fragile one. “Why can't I follow this person?” Well, because their server is emitting garbage JSON-LD that happens to work with implementations that just treat it as a regular JSON blob. Every time I get one of these bug reports, I feel a certain injustice. Like being the only person in the group project who actually read the assignment.

                              To be fair, there are real practical reasons why most people don't bother with proper JSON-LD processing. Implementing a full processor is genuinely a lot of work. It leans on the entire Linked Data stack, which is bigger than most people expect going in. And the performance cost isn't trivial either. Fedify uses some tricks to keep things fast, and I'll be honest, that code isn't my proudest work.

                              Anyway, none of this is going anywhere. Just me grumbling into the void. If you're building an ActivityPub implementation, maybe consider using a JSON-LD processor if one's available for your language. And if you're not going to, at least test your output against implementations that do.

                              #JSONLD #fedidev

                              potatomeow@fosstodon.orgP This user is from outside of this forum
                              potatomeow@fosstodon.orgP This user is from outside of this forum
                              potatomeow@fosstodon.org
                              wrote last edited by
                              #69

                              @hongminhee i struggling badly with rust cuz it's rust being rust... i can imagine a duck typing lang might have easier time

                              potatomeow@fosstodon.orgP 1 Reply Last reply
                              0
                              • potatomeow@fosstodon.orgP potatomeow@fosstodon.org

                                @hongminhee i struggling badly with rust cuz it's rust being rust... i can imagine a duck typing lang might have easier time

                                potatomeow@fosstodon.orgP This user is from outside of this forum
                                potatomeow@fosstodon.orgP This user is from outside of this forum
                                potatomeow@fosstodon.org
                                wrote last edited by
                                #70

                                @hongminhee most of the time, i cant compile if really do jsonld as it is. unless i box everything onto the heap. but then it became a de-optimization point to the rest of the software

                                1 Reply Last reply
                                0
                                • sl007@digitalcourage.socialS sl007@digitalcourage.social

                                  @julian

                                  Can you specify "threadiverse" software cause like all properties which are not marked as "functional" in the ActivityPub Spec, `context` is an Array and I do not see any problem …

                                  sl007@digitalcourage.socialS This user is from outside of this forum
                                  sl007@digitalcourage.socialS This user is from outside of this forum
                                  sl007@digitalcourage.social
                                  wrote last edited by
                                  #71

                                  @julian

                                  ^ what I mean :

                                  "context": [
                                  "https://threadiversesoftware.example.org/thread/123",
                                  "https://www.wikidata.org/wiki/Special:EntityData/Q64 "
                                  ];

                                  then says:
                                  "Hi machine, I am in the context of thread 123 about Berlin."

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

                                    @sl007@digitalcourage.social eh? You use context?

                                    ForumWG decided to use context to represent threads in threadiverse software (and Mastodon too, now).

                                    Just FYI.

                                    sl007@digitalcourage.socialS This user is from outside of this forum
                                    sl007@digitalcourage.socialS This user is from outside of this forum
                                    sl007@digitalcourage.social
                                    wrote last edited by
                                    #72

                                    @julian

                                    Is there a W3C minutes or kind of a meeting-protocol|spec. about this use of context?

                                    julian@activitypub.spaceJ 1 Reply Last reply
                                    0
                                    • sl007@digitalcourage.socialS sl007@digitalcourage.social

                                      @julian

                                      Is there a W3C minutes or kind of a meeting-protocol|spec. about this use of context?

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

                                      @sl007@digitalcourage.social FEPs 7888 and f228 details the use of context and one use case of it, to backfill conversations.

                                      sl007@digitalcourage.socialS 1 Reply Last reply
                                      0
                                      • julian@activitypub.spaceJ julian@activitypub.space

                                        @silverpill@mitra.social POSTing that inbox sends a 404?

                                        ? Offline
                                        ? Offline
                                        Guest
                                        wrote last edited by
                                        #74

                                        @julian Yes, POST to personal inbox sends a 404, POST to group inbox sends a 202 (I guess group inbox is how we communicate now).

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

                                          @sl007@digitalcourage.social FEPs 7888 and f228 details the use of context and one use case of it, to backfill conversations.

                                          sl007@digitalcourage.socialS This user is from outside of this forum
                                          sl007@digitalcourage.socialS This user is from outside of this forum
                                          sl007@digitalcourage.social
                                          wrote last edited by
                                          #75

                                          @julian

                                          well, but that is _exactly_ the same of the official Social CG meetings !

                                          "This context property is the URL of the NodeBB topic."
                                          vs.
                                          "The context property should be used to identify the context in which the object appears in, form a common topic or group content. This can be a well known JSON-LD vocabulary or any ActivityPub Object useful for the implementation."
                                          vs
                                          https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context :

                                          „Identifies the context within which the object exists or an activity was performed.
                                          The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event. “

                                          and I am glad cause, as said
                                          "context": [
                                          "https://threadiversesoftware.example.org/thread/123",
                                          "https://www.wikidata.org/wiki/Special:EntityData/Q64 "
                                          ];
                                          then says:
                                          "Hi machine, I am in the context of thread 123 about Berlin."

                                          and then

                                          🧵 1/2

                                          sl007@digitalcourage.socialS 1 Reply Last reply
                                          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