this post was submitted on 30 Jun 2024
270 points (95.9% liked)

Programmer Humor

18243 readers
1717 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

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.”

you are viewing a single comment's thread
view the rest of the comments
[–] MostlyBlindGamer@rblind.com 14 points 3 days ago (14 children)

Thanks for the transcription!

Surely Java can tell the difference between a key with a null value and the absence of that key, no?

I mean, you can set up your deserialization to handle nulls in different ways, but a string to object dictionary would capture this, right?

[–] NigelFrobisher@aussie.zone 3 points 2 days ago

You can always bind the JSON to a hashmap implementation, as that’s all JSON is anyway. It’s not pretty but it works.

load more comments (13 replies)