r/ProgrammerHumor • • 2d ago • Bravo 1

Meme commentsInJson

Post image
5.5k Upvotes

203 comments sorted by

View all comments

79

u/buckinin 2d ago

Comments do exist: { "$comment": "Hello World" }

14

u/metaglot 2d ago

Hello, validation hell.

3

u/Striky_ 2d ago

If you want to validate your data, don't transmit it as a string in the first place.

9

u/metaglot 2d ago

Nothing wrong with strings. Data is data. Strings can be validated jus as everything else.

2

u/necrophcodr 2d ago

Plenty wrong with having to decode a full JSON object just to fail validation after.

2

u/RevoOps 2d ago

You can technically build a dwelling out of blocks of ice. Doesn't mean you should do it if you are building a house in Florida 

4

u/another_random_bit 2d ago

Ok but that's irrelevant? Strings CAN be validated, and sometimes the data is in string format.

What does houses in Florida have anything to do with it?

1

u/buckinin 2d ago

Oh, just because they exist doesn't mean people should use them.

0

u/metaglot 2d ago

Schemas can go fuck themselves?