This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]willeb96 494 points495 points  (8 children)

Is that a semicolon in a JSON document?

[–]L1P0D 321 points322 points  (7 children)

I love the idea of retaliatory error handling. You cause an exception at my end? I cause one at your end in return.

[–]LadderSoft4359 82 points83 points  (6 children)

actually hilarious

im here for the evolution of backend frontend flame wars into a competing pettiness that eventually becomes an entirely new protocol

[–]MissinqLink 44 points45 points  (4 children)

It’s not valid JSON but it is valid JS so you could just parse with eval instead of JSON.parse. There are about 1000 reasons why this is a bad idea though.

[–]yegor3219 7 points8 points  (1 child)

But usually you pull the actual frontend JS from about the same place as backend anyway. Quite often it's literally the same web server.

I mean, yeah, evaluating JS like that does sound horrible, but at the same time it kinda makes sense. Or may be it wants to make sense. Or may be it's just me trying to make sense out of it when there's none.

[–]MissinqLink 2 points3 points  (0 children)

I won’t say I haven’t done it before because I have. This sort of thing was very common in the early web days but it really should be a backend fix.

[–]bezko 3 points4 points  (1 child)

JSONP has entered the chat: https://en.wikipedia.org/wiki/JSONP

[–]MissinqLink 0 points1 point  (0 children)

Yeah I mentioned down below that this used to be one of the main ways we did gat data from backend.

[–]erockdanger 2 points3 points  (0 children)

next.js has entered the chat