Skip to content
  • Categories
  • Recent
  • Popular
Skins
  • Light
  • 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-ActivityPub Bridge Test Instance

  1. Home
  2. Categories
  3. Uncategorized
  4. i'm not 100% sure about this but i am starting to think that the way #jsonld context declarations propagate by default is generally an anti-pattern

i'm not 100% sure about this but i am starting to think that the way #jsonld context declarations propagate by default is generally an anti-pattern

Scheduled Pinned Locked Moved Uncategorized
jsonld
106 Posts 3 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.
  • jens@social.finkhaeuser.deJ jens@social.finkhaeuser.de

    @trwnh ... JSON processor resolving JSON references and replacing them with their referred to objects, this sits somewhere on an intermediate layer between JSON and JSON-LD.

    If the processor "speaks" references, then according to any and all rules about processing them, this is fine.

    It isn't doing anything wrong, because the data structure derived from parsing the doc-with-refs-preserved and the one derived from parsing doc-with-refs-resolved is the same.

    In that sense, it isn't changing...

    jens@social.finkhaeuser.deJ This user is from outside of this forum
    jens@social.finkhaeuser.deJ This user is from outside of this forum
    jens@social.finkhaeuser.de
    wrote last edited by
    #101

    @trwnh ...anything at all about the represented data.

    If this changes anything about the semantics of the LD, then JSON-LD shouldn't be using JSON references (brutally put, I know), because it knowingly breaks the underlying JSON semantics.

    jens@social.finkhaeuser.deJ 1 Reply Last reply
    0
    • jens@social.finkhaeuser.deJ jens@social.finkhaeuser.de

      @trwnh ...anything at all about the represented data.

      If this changes anything about the semantics of the LD, then JSON-LD shouldn't be using JSON references (brutally put, I know), because it knowingly breaks the underlying JSON semantics.

      jens@social.finkhaeuser.deJ This user is from outside of this forum
      jens@social.finkhaeuser.deJ This user is from outside of this forum
      jens@social.finkhaeuser.de
      wrote last edited by
      #102

      @trwnh Since we're working with plain text analogies here, this is like putting non-ASCII bytes into a string without specifying anything about what they mean (i.e. an encoding).

      trwnh@mastodon.socialT 1 Reply Last reply
      0
      • jens@social.finkhaeuser.deJ jens@social.finkhaeuser.de

        @trwnh Since we're working with plain text analogies here, this is like putting non-ASCII bytes into a string without specifying anything about what they mean (i.e. an encoding).

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

        @jens we might finally be on the same page 🙂

        > Lower level processors cannot make assumptions about higher level processors, without being told to make them.

        this is what i was trying to do, yeah. how can a lower level processor preserve higher level semantics? what do you need to "tell" them to retain alignment?

        the references are kind of unavoidable, since this is the web we're talking about. you have multiple documents, but naive processors try to be "clever" and save you HTTP requests.

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

          @jens we might finally be on the same page 🙂

          > Lower level processors cannot make assumptions about higher level processors, without being told to make them.

          this is what i was trying to do, yeah. how can a lower level processor preserve higher level semantics? what do you need to "tell" them to retain alignment?

          the references are kind of unavoidable, since this is the web we're talking about. you have multiple documents, but naive processors try to be "clever" and save you HTTP requests.

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

          @jens the "rub" is that AS2 claims to be "JSON-LD but you can totally ignore the LD part we promise lol"

          you can *mostly* ignore a lot of the complexity, but only if you stay within the boundaries of activity+json semantics, i.e. "don't use external vocabs, and if you do, don't redefine activitystreams terms"

          the extensibility mechanism is ld+json. you can include ld+json inside activity+json but you need to not violate the constraints of activity+json.

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

            @jens the "rub" is that AS2 claims to be "JSON-LD but you can totally ignore the LD part we promise lol"

            you can *mostly* ignore a lot of the complexity, but only if you stay within the boundaries of activity+json semantics, i.e. "don't use external vocabs, and if you do, don't redefine activitystreams terms"

            the extensibility mechanism is ld+json. you can include ld+json inside activity+json but you need to not violate the constraints of activity+json.

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

            @jens but also, any json can become ld+json with a sufficiently complex context definition. the ld+json processor cannot understand the implicit semantics of json; it needs to be made explicit in the form of a jsonld context.

            we want the jsonld context's described semantics to not diverge from the *actual* semantics. we can't be aware of every vocab or media type in the world. so the semantic boundaries between individual resources are important.

            but we do want to reduce those pesky roundtrips

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

              @jens but also, any json can become ld+json with a sufficiently complex context definition. the ld+json processor cannot understand the implicit semantics of json; it needs to be made explicit in the form of a jsonld context.

              we want the jsonld context's described semantics to not diverge from the *actual* semantics. we can't be aware of every vocab or media type in the world. so the semantic boundaries between individual resources are important.

              but we do want to reduce those pesky roundtrips

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

              @jens this is why i put "clever" in quotation marks. like, yes, that's just how references work, no problems there.

              the problem is that you are taking something that isn't activity+json and sticking it in an activity+json document.

              more precisely, the media type no longer applies to the *entire* document; there is a fragment of the document that has a different media type (like the hypothetical schemadotorg+json i was talking about earlier)

              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.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Popular