TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JQuery 1.4 and Malformed JSON

18 pointsby iveyover 15 years ago

4 comments

axodover 15 years ago
&#62;&#62; "Again, though, you should probably be modifying your busted server-side code to stop sending malformed JSON!"<p>I still think it was a silly mistake to impose a 'must be enclosed in quotes' rule for JSON parsing in js.<p>Those quotes are just wasted extra bytes. Needless.<p>Yeah sure, you can argue that someone silly will use a reserved word, like {new:"hello"}. But I don't think that's a good enough reason to waste more bandwidth+time for those that know what they're doing.
评论 #1063487 未加载
评论 #1063504 未加载
评论 #1063488 未加载
Semiapiesover 15 years ago
Came up at least once before, but no discussion there:<p><a href="http://news.ycombinator.com/item?id=1054409" rel="nofollow">http://news.ycombinator.com/item?id=1054409</a>
评论 #1063986 未加载
radsover 15 years ago
I had a problem with this today when upgrading from jQuery 1.3.2 to 1.4. The AJAX functions worked fine in Firefox, were returning "parseerror" in Safari because there was a non-UTF-8 character in the JSON response.
cellisover 15 years ago
Could someone tell me why the example given is malformed? I rarely write JSON anymore (except with json_encode in php and simplejson in python).
评论 #1063658 未加载
评论 #1063662 未加载