236

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

you are viewing a single comment's thread
view the rest of the comments
[-] ShortFuse@lemmy.world 5 points 4 days ago* (last edited 4 days ago)

The meme format is awesome, but JSON differentiates strings with ".

{ "key": 1337 } vs { "key": "1337" }.

You might be thinking yaml? (Though it supports ' and " for explicit string types, technically)

But integer vs float? Good luck.

[-] ApexHunter@lemmy.ml 10 points 4 days ago

The joke is that, regardless of how the type is declared in json, you are parsing a string. (your json blob is just a series of characters, not raw binary data)

[-] Zucca@sopuli.xyz 1 points 3 days ago

Yes. And many people here doesn't seem to get that.

I'm not a dev of any kind. I occasionally write some bash and awk scriots to automate some things and if I need some kind of plain text (non-binary) data format I prefer tsv over json.

So why do I still get this? Is it just that many json advocates want to make sure others know json does support other data types than plain string?

this post was submitted on 30 Jun 2024
236 points (97.2% liked)

Programmer Humor

31229 readers
52 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS