• MalReynolds@slrpnk.net
    link
    fedilink
    English
    arrow-up
    20
    ·
    23 hours 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
        9
        ·
        21 hours 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)

        • DaleGribble88@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 hours ago

          Holy cow! I don’t think I’ve ever met another developer who actually admits to using action script back in the day. Greetings fellow old person!

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

            Yup pre iPhone front end development was all over the place. I actually started with Macromedia flash when it was still just a few actions. I think 1998-99 was the first time I used it. AS3 was a neat language though, I still kinda miss it now and then.

        • jaybone@lemmy.zip
          link
          fedilink
          English
          arrow-up
          10
          ·
          20 hours 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
            4
            ·
            16 hours 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

            • jaybone@lemmy.zip
              link
              fedilink
              English
              arrow-up
              1
              ·
              4 hours ago

              To add to other replies, I think there are some Java libraries that use this method name, or close to it. It’s so common that the term is well recognized on its own, regardless of the exact method names in whatever library or language.

            • DaleGribble88@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              7 hours ago

              Python has a popular library called “Flask” that uses stringify(). Although, python also has an implementation in its standard library called jason.dumps()

            • anomnom@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              14 hours ago

              Not sure but with Ruby it was JSON.generate(ruby_array/hash/object).

              And it returned - JSON string of your argument.