Transcript from the "JSON" Lesson
>> Douglas Crockford: Now it turns out I have a little bit of experience at convincing everybody in the world to do the right thing.
>> Audience: [LAUGH]
>> Douglas Crockford: For example, there's the JSON data interchange format, the world's best loved data interchange format. It took a while to convince everybody but eventually everybody got on board, and the death threat stopped and we're all happy about it now.
[00:00:26] I'm very happy to report that this took much less than a generation. This is one of those very rare things where we're able to move it in just a few years. So, if you look at Google Trends and compare the trends of JSON versus XML, you'll see that the world has steadily been losing interest in XML.
[00:00:46] Looks like that the years are chopped off here but it's on the other screen. Since 2005 the world has steadily been losing interest in XML. And we've slowly, quietly been seeing interest in JSON creeping up. And this increase was not motivated by any industry. There is no JSON industry which drives this there, because all the tools are free and simple and so it's just happening because you decided this is a better way of doing things and so it's just taking up.
[00:01:20] So I can't predict when these lines cross over but Google can, so looks like next year for sure JSON becomes officially more interesting according to Google than XML.
>> Douglas Crockford: I have no way of knowing. It seems like that to me too but-
>> Speaker 2: I think they're just Googling XML because it's still difficult and we don't have to Google a JSON so often cuz it's easy.
>> Douglas Crockford: I think there's a lot to it there, yeah, so a lot of.
[00:01:54] If the search suggestions, XML sucks, that's a popular thing, you don't see that on JSON searches. So there may very well be something to that. So I did not intend for JSON to be the last data interchange format. JSON was intended to do a very specific thing of allowing applications written in different languages to be able to communicate with each other over the Internet.
[00:02:23] But JSON is now being used for lots of other things, things that it wasn't necessarily designed for and so I expect they're going to be other data formats as well. So, I have some advice to anybody else who might be designing another data format. Number one, please don't break JSON.
[00:02:41] JSON is working really well for the thing that it was originally designed for. One of the best things that I did in JSON was, I did not put a version number on it. So there is no way to revise it. We can't say JSON 1.1 because there was no JSON 1, it's just JSON.
[00:03:00] So the way it is, is the way it will always be, which is great because if you look at the stack. I expect over the years the stack is gonna be changing all the time at every level, except in the JSON layer. The JSON layer will always work the way it does right now.
[00:03:19] And that's a pretty nice thing, having that level of reliability, the integrity and anything in the net is huge. I can't think of any feature we could add to JSON which is more valuable than that. So, if you want to make something else, please make something else and make it better.
[00:03:37] But don't try to break JSON, leave JSON alone.
>> Douglas Crockford: Whatever you're gonna do, if you're gonna do something that's kind of like JSON but different, make it significantly better. If it's just JSON with one or two little things, then what you're doing is you're adding a compatibility hazard to the world, that people are gonna have to deal with this thing which is kind of like JSON but isn't.
[00:04:00] And so there's a cost to that. So make sure the cost is worth it, add enough value to it to justify that cost. And get a better name because no question, the worst thing about JSON is the name. For one thing people are confused about how to pronounce it.
[00:04:20] I say JSON, a lot of people say JSON, it turns out the correct pronunciation is JSON.
>> Audience: [LAUGH]
>> Douglas Crockford: Everybody?
>> Audience: JSON.
>> Douglas Crockford: [LAUGH] Yeah, so and I hear from guys all the time named Jason saying, I'm in the office and I hear someone saying, what. So, I'm sorry Jason if you're here.
>> Speaker 2: What should you have called It?
>> Douglas Crockford: I don't know.
>> Audience: [INAUDIBLE]
[00:06:30] They have this more brittle thing, we've got classes and instances, and so on. So they get confused that we can send them a JSON object and they go that's not an object, yeah. Notation, maybe that's okay. So notation is bad. So if you're going to make up a new data standard and I think you should, don't call it JSON.
[00:06:50] Don't stick a letter in front of it or a letter on the end of it or anything like that. Come up with some creativity, do something good there.