4 ms·
Can you elaborate please? Browsers had native XMLHttp support before they had JSON support. The fact JSON (use to be) a subset of JavaScript and the browser r
by eranation 10y ago
Can you elaborate please?
Browsers had native XMLHttp support before they had JSON support.
The fact JSON (use to be) a subset of JavaScript and the browser runs JavaScript natively is not convincing.
Other than evil eval(jsonString) (before JSON.parse was available) which is basically asking for XSS, what benefit you get from JSON being consumable by JavaScript?
I think XMLHttp was available in browsers (in a vendor specific annoying way perhaps but still available) way before JSON.parse was available... am I missing something?
- paulddraper 10y agoThe XML in XMLHttpRequest is meaningless. eval() was present from day 1 and is the reason JSON looks like it does. Obviously it requires complete trust in the source (historically, the same origin).