Meme transcription: Panel 1. Two images of JSON, one is the empty object, one is an object in which the key name maps to the value null. Caption: “Corporate needs you to find the difference between this picture and this picture”

Panel 2. The Java backend dev answers, “They’re the same picture.”

  • sik0fewl@lemmy.ca
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    4 days ago

    Ya, having null semantics is one thing, but having different null and absent/undefined semantics just seems like a bad idea.

    • Username@feddit.de
      link
      fedilink
      arrow-up
      6
      ·
      4 days ago

      Not really, if absent means “no change”, present means “update” and null means “delete” the three values are perfectly well defined.

      For what it’s worth, Amazon and Microsoft do it like this in their IoT offerings.