• lime!@feddit.nu
    link
    fedilink
    arrow-up
    19
    ·
    27 days ago

    i’ve designed my own communication protocols that run directly on udp. i couldn’t tell you either.

    • MalReynolds@slrpnk.net
      link
      fedilink
      English
      arrow-up
      6
      ·
      27 days ago

      Ima guess it’s javascript-ese to turn a json object into a string, perhaps for serialization. But no clue, coding for decades but always hated js, I guess my way through with a linter and IDE when I absolutely, positively, cannot find an alternative, which seldom happens.

        • anomnom@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          27 days ago

          Before yaml, I used json with Ruby it was way nicer to read than xml config files ( but way before that I started using it with PHP and Actionscript)

          • jaybone@lemmy.zip
            link
            fedilink
            English
            arrow-up
            3
            ·
            27 days ago

            Yeah you don’t have to be using JavaScript to use json. Yes I know it’s part of the name, but it’s just an object notation which is the other part of the name, and this has become widely accepted for use in nearly all popular languages and frameworks.

            • lad@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              27 days ago

              Are there any other languages that would also have Json.Stringify? I only read JS sometimes and never write those, so I may be wrong about that.

              JSON itself is fine, yeah

              • anomnom@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                1
                ·
                27 days ago

                Not sure but with Ruby it was JSON.generate(ruby_object).

                And it returned - JSON string of your argument.

    • ramble81@lemmy.zip
      link
      fedilink
      arrow-up
      4
      ·
      27 days ago

      I mean, that’s fine, right up till you have to communicate with something else. Given that 99% of APIs out there use JSON.

    • lobut@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      27 days ago

      I refuse to believe you couldn’t infer what this is, you’re way too smart and you could definitely just guess.

      • lime!@feddit.nu
        link
        fedilink
        arrow-up
        1
        ·
        27 days ago

        turning a data structure into a string is usually called like “marshal” or “render” or “dump” or something, “stringify” doesn’t really imply anything except something about the json being turned into a string. for all i know it could be replacing all the values with toString’ed versions.

        • Buddahriffic@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          26 days ago

          Another guess just based on the terms is it could be a method that throws your json object into a black hole and returns the version of the object that is stretched out to infinity.

          Though that’s just an optical illusion, in reality the object would be ripped apart by the gravity or extreme radiation, depending on whether it was a small or large black hole.

          Your guesses are more useful, but I can’t fathom what goes on in the mind of JavaScript devs.