News for hackers. Stuff that matters.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by Thiz on Monday April 29, 2013 @11:08AM (#5626609)
I'd like to know the first guy to send json over the wire starting the ajax craze.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by jdminhbg on Monday April 29, 2013 @11:18AM (#5626694)
Douglas Crockford, as that was the first thing JSON (as a data format) was used for: http://en.wikipedia.org/wiki/JSON#History
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by chubot on Monday April 29, 2013 @01:50PM (#5627641)
Crockford has said that people were using JSON before he "discovered" it. That's why he says he discovered rather than invented it.

Unfortunately I don't remember who those people were, but anyone who used XmlHttpRequest, which was apparently there in the 90's, could have used it.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by rsl7 on Monday April 29, 2013 @05:46PM (#5629051)
I made up and used something similar to JSON in 1996. It's not difficult to think up if you're trying to find the simplest possible text-based hierarchical data format. There were a lot of variations on this idea.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by udp on Monday April 29, 2013 @11:26AM (#5626753)
Well, it's possible an object was transmitted as JavaScript source (to be decoded using eval) before the JSON spec existed.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by pbreit on Monday April 29, 2013 @03:24PM (#5628110)
Michael Peachey's "General Interface" (sold to Tibco) was doing Ajax quite awhile before the term was coined.

The Ajax craze was, of course, with XML (ie, the X in Ajax). JSON is certainly a more pleasant format to work with but not a huge leap over XML. But it was lame that XML was melded on such as it was.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by aaimnr on Monday April 29, 2013 @12:52PM (#5627301)
Ajax craze started with XML. JSON came later.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by account_taken on Monday April 29, 2013 @01:11PM (#5627422)
Ajax started with Al Gore, without whom the internet would have never been invented :p
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by account_taken on Monday April 29, 2013 @01:37PM (#5627568)
Wow everybody serious on ycombinator. Can't even make a joke about Al Gore anymore.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by gruseom on Monday April 29, 2013 @02:05PM (#5627708)
It's not that everyone's serious, it's that this community's greatest fear is that HN will get overrun by frivolous comments and other weeds. As a result, one of the tradeoffs that's evolved is that people reflexively downvote jokes. (Non-funny jokes get hammered particularly hard.) It's best not to take it personally and work on one's noise/signal ratio.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by mortenjorck on Monday April 29, 2013 @03:28PM (#5628135)
I've mostly avoided trying to be funny on HN, but I've been voted up for cracking wise on a few occasions, and have voted up things that made me genuinely laugh.

It's a dreary business trying to analyze humor, even more so to analyze what kind of humor plays well at Hacker News, but I'd say the more original the joke, and the more the joke makes you think afterward, the better it will do.

As an aside, my goodness, this is such an HN comment.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by bdowney on Monday April 29, 2013 @02:13PM (#5627744)
That's because that joke stopped being funny 10 years ago.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by jtheory on Monday April 29, 2013 @05:10PM (#5628805)
Worse: it's been more than fourteen years since Gore's original awkward wording, and surely the jokes about it weren't funny for 4+ years.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by brent_noorda on Monday April 29, 2013 @09:50PM (#5630013)
I'll take credit for that one. In the mid 90's at Nombas we created what we called DSP (Distributed Scripting Protocol) that serialized data (and functions) into js objects (now known as JSON) to be both human- and computer- readable and solve a lot of other problems (one of them being the danger of IBM's XML-hell, or Microsoft's DCOM or Suns's i-forget-what-it-was-called-java-thing taking over). We showed it doing super-duper cool stuff at ECMA committee meetings, and to the magazines and trade shows of the day, and filed patents for just about everything now seen as "AJAX" or "dnode"--had a lot of fun, but also A LOT of trouble getting people to use it because they saw it as weird.

Douglas Crockford's brilliant move was to create the web site http://json.org/ By putting the ".org" at the end he tricked the world into believing it was an accepted standard.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by niggler on Monday April 29, 2013 @11:14AM (#5626662)
I think Crockford (http://crockford.com/) -- he is mentioned in the RFC: http://www.ietf.org/rfc/rfc4627.txt?number=4627
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by DigitalJack on Monday April 29, 2013 @12:02PM (#5626989)
More specifically, he wrote the RFC.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by nobodysfool on Monday April 29, 2013 @01:44PM (#5627605)
JSON is great for sending javascript objects over the network. However, the way most people use it, they'd benefit from switching to CSV files instead. JSON has a lot of overhead (each instance of each object has to have a name), but it's better than xml.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by Stratoscope on Monday April 29, 2013 @03:18PM (#5628072)
That's true, but the JSON data is sent over the wire with gzip compression. All those repeated names compress out very nicely.

CSV is still probably more compact than JSON even when compressed, but the difference isn't nearly as much as you'd expect from the raw textual version.

Of course it gets expanded back to the full text in the browser, but that gets parsed and discarded right away.

When I read CSV in JavaScript, for convenience I usually end up converting it to in-memory objects that resemble the JSON object that I would have downloaded otherwise. So at least in that case there isn't much difference in memory use either.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by mpyne on Monday April 29, 2013 @08:59PM (#5629859)
Also browsers are much more likely to be able to optimize the parsing of JSON back into a DOM than they are to be able to optimize the JS that would be used to parse the CSV.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by iso8859-1 on Monday April 29, 2013 @03:51PM (#5628268)
CSV files are simply lists of tuples. You can do lists of lists in JSON. Your overhead will be two characters (opening/closing braces) per tuple (one if you skip the newline, which you can't skip in CSV), plus a dozen characters for the whole file. I don't think that's a lot of overhead, seeing that you get the benefits of a format that is actually standardized.

Example (CSV):

    name,age
    James,32
    Nina,10
    Helga,90
JSON:

    {"fields":["name","age"],
    "content":[
    ["James",32],
    ["Nina",10],
    ["Helga",90]
    ]}
Don't tell me it's harder to parse, cause you'd have to do the index→fieldname conversion in CSV too.
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by teyc on Wednesday May 08, 2013 @09:48PM (#5678306)
CSV isn't standardized. http://en.wikipedia.org/wiki/Comma-separated_values#Lack_of_... There are a lot of questions regarding use of quotation, new lines etc.

JSON's standard is that it should be able to be eval'd by javascript interpreter. Even then, date handling is less than ideal.

Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by corford on Monday April 29, 2013 @06:30PM (#5629286)
I don't know if it was JSON that started the ajax craze... I remember it being Google Suggest that brought the potential of Xmlhttprequest in to the mainstream (and there being a brief period thereafter where no one could decide whether to call the technique "xmlrpc" or "ajax"). JSON sprung up in a mainstream way a year or so after all that (or my memory is crap... which is quite possible!).
Re:Ask HN: Who built XMLHttpRequest at Microsoft in 1999? by kragen on Monday April 29, 2013 @03:12PM (#5628039)
It was popularized with the release and subsequent reverse-engineering of GMail. Maybe someone was doing it before that.