Meme transcription:

Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?

Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”

    • 0x0@programming.dev
      link
      fedilink
      arrow-up
      11
      ·
      3 months ago

      If there are no humans in the loop, sure, like for data transfer. But for, e.g., configuration files, i’d prefer a text-based solution instead of a binary one, JSON is a nice fit.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        What I’d like for a configuration language is a parser that can handle in-place editing while maintaining whitespace, comments, etc. That way, automatic updates don’t clobber stuff the user put there, or (alternatively) have sections of ### AUTOMATIC GENERATION DO NOT CHANGE###.

        You need a parser that handles changes on its own while maintaining an internal representation. Something like XML DOM (though not necessarily that exact API). There’s a handful out there, but they’re not widespread, and not on every language.

    • themusicman@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      3 months ago

      If you’re moving away from text formats, might as well use a proper serialisation tool like protobuf…

    • bleistift2@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 months ago

      Hell, no. If I wanted to save bytes, I’d use a binary format, or just fucking zip the JSON. Looking at a request-response pair and quickly understanding the transferred data is invaluable.