 JSON is amazing. It's considerably less verbose than XML, which it has largely replaced at this point. It is considerably simpler than CORBA, which is a massively complex beast. It's so simple you can put it on a business card. The entire specification will fit on a business card. It's even an ECMA standard. This is amazing. This is a very lightweight simple data exchange format. More people should use it, right? The only thing about amazing about JSON is marketing. JSON is a brilliant case study in how to market something. That's complete bullshit. JSON is the de facto standard when it comes to un-serializing and exchanging data in web and mobile programming. But how well do you really know JSON? Really, though? How well do you know it? This guy is brilliant for doing this. I thank him so much for this. I'll have a link to this. It's a pretty simple link anyways. But I'll have a link to this down in the video description. I would definitely encourage you to read this because he does a great job of breaking down why JSON is remarkably unreliable. But let's talk about a few things that I definitely recognize are issues from my experience. There isn't actually a JSON version or definition. It says whatever it is in its current form, that's it. This is a really bad idea for numerous reasons, especially if you have two servers out on the internet talking different versions of JSON. That's an incompatibility. And because they have no negotiation for that version, they just assume that they're both working with the same one and that's not necessarily the case. Now, it is a good idea to constantly update your software. Not doing that causes ridiculous things like the Equifax data breach, although there were other factors in play there, but you really want to keep your shit up to date. However, realistically, I know that's not always possible and it may even just be in a situation where, like, you update a week after the developers updated it. But during that week, you have incompatibility issues with people who have updated before you. You can be on top of updates, but this versioning issue still can rear its head. But then, as he points out, there's actually a few different versions of JSON. You have the ITF RFC 4627, the sort of a definition in ECMAScript 262, there's the ECMA 404, the IETF RFC 7158 and 7159, which granted the differences between 7158 and 7159 are basically non-existent, but we are dealing with differences, important differences. But also, and I'm really glad he pointed this out, the goal of JSON was basically to just be a subset of JavaScript to use JavaScript's object notation format, that's where it gets its name, JSON is JavaScript Object Notation, just to define objects in general. But it doesn't actually do that. And it's not just limited to what he points out here, but like he points out, there are unicode line terminators that are allowed in JSON, but are not allowed in proper ECMA 262, which is JavaScript. So that means that even a proper JavaScript object cannot directly be put into JSON, because it's not a true subset. And he goes on to define a bunch of tests and how he's approaching this and whatnot, things that should be supported and all of that, things that should not be supported, but wind up getting passed correctly and talks about some ambiguities, because that's important. Ambiguities mean that implementations are not going to work all the same way. So this is really what we're interested in here. This is the, wow, this is really hard to see on FHD. 4K is lovely for big things like this, but I'm not going to upload a 4K video that takes up so much space. This key is what we're going to be interested in. The blue stuff is ambiguities. That's not critical, but is really not something you want to see. The yellow stuff is fundamentally incompatibilities when things that didn't work the way they're supposed to, according to the JSON standard. And red is just an implementation issue. The parser itself crashed. That's a bug that needs to be fixed within that parser, but that does fundamentally contribute to the incompatibilities between these implementations. See, there's a heck of a lot of blues. Again, I encourage you to look at these, because I'm not going to go through and explain what all of these are, but there's a lot in the way of these. We'll call them irregularities, but even when we delve down into the other tests, you'll see any specific test case. Most of them will pass it correctly, but there are these odd irregularities in how they handle it. That's a problem. The whole point of something like JSON of XML is to take a complicated object that cannot be easily represented. An integer is pretty much an integer. You have a few things like little-endian and big-endian issues, but those are pretty easy to deal with. When you have more complicated things, records are even all the way up to complex objects. God, the idea of trying to send a container through JSON to another machine scares me. Having seen these issues, I expect that container to be completely messed by the time it gets sent to another device. This really hampers the thing that JSON was meant for. If you're using it to save a program state, that's fine. You're using the exact same parser slash generator to generate the state, save it to a file, and then to load it back at a later point. A lot of programs nowadays are starting to use JSON for settings. VS Code is a prime example where the entire settings configuration is just done through a JSON file. I have no problem with using JSON for that, although an INI or similar is usually enough to get the job done a little more appropriate than that. Using JSON for that is fine. I have no fundamental qualms about that. But using JSON for actually transmitting objects between devices when you're doing things like distributed computing or whatnot, after seeing these results, I definitely feel that it is not appropriate to use JSON for these things, because there's just too many incompatibilities. So I hope this video helped. It helped you out, especially if you're developing a distributed system. Know that you are going to have a few headaches down the road, and you should really test against a large number of JSON parsers to make sure that your stuff is working correctly. You found this video helpful, and I really hope you did. Give me a thumbs up. If you like my videos in general, please subscribe. I'm constantly putting out new content, but the subscriptions helped me out quite a bit. Have a good one.