 Okay today we are going to be converting XML into JSON. Why? I just like JSON better. I think it's cleaner looking. I think it's easier to parse through. I mean, XML is great in fact that it's just plain text. So if I needed to, I could always just grep through a file, maybe use cut and awk and set and stuff to pull information out of it. But I'm very used to working with JSON format. So it'd be great if I convert XML to JSON. And I'm going to show you how to do that with a program called JC, which a viewer of mine recommended to me. I wish I looked up his name before I started recording this. But it is an amazing tool. It's in the current repositories for newer Debian systems. If you have an older one, you might have to go to GitHub or I think it's in the Python package manager. But on my version of Debian, it is in repositories. So the pseudo app install JC and it will convert not just XML, but all these different file formats and outputs of different commands. We'll look at that more in future videos. But today, today we're just going to take some XML. So I've been doing videos on my arcade in the other room, which is running emulation station. And almost all the configuration files for that are XML. I pulled a file off that XML file that has all the information for all my Nintendo games, you know, the art, the description, ratings, and the names of the games. Well, I'm going to use that to as an example, we're going to use JC to convert it and then JQ to parse through it. Let's go ahead and jump right in. So again, the name of the file is game list.xml. So I'm going to run that and you can see, yeah, it's XML. Let's go ahead and just pipe that into again JC. And again, if you don't have JC, try pseudo app install JC. I already have it installed. If it's not there, look at their GitHub page. I'm pretty sure it was up on GitHub. And anyway, we're going to run that into JC. So we're going to output it, but we have to tell it what type of file it already is. We're going to say dash dash XML. And again, it supports ridiculous amount of formats that you wouldn't even believe. But I'll go over that in future videos and it will convert that XML into nice JSON here. It's not pretty. So if we want to make it prettier, we can just pipe that into JQ. Again, that should be in repositories. I've done many videos on that. It's a great, great tool for parsing through JSON. And since now is JSON, we've got it pretty. If I was to just quickly run that same command and say, head, we can see the top of this file. And we can see that we have game list game, which is an array. And then we can go for the file name if we want to know the game name. So let's go ahead and run that command again. But we're going to say dot and I'm just going to copy and paste game list game. And again, that's an array. So I got to put the brackets there dot name. And that will give us a list of all Nintendo games I have. Now it's in quotations. If I didn't want quotations, I could always run that same command with the dash R option. And that will just give us the raw data. And there you go. I have a list of all my games. So this is great XML. That was just an example. But again, we're going to look at this JC command more in the future. It does a lot, a lot of amazing things that allow you to convert all these different things to JSON. I'm very excited about it. I hope you are too. I thank you for watching. Please visit filmsbychrist.com. That's Chris for the K. There's a link in the description, support section there, Patreon, LibrePay, PayPal, can't do those things. Like, share, subscribe and comment. I thank you for watching. And as always, I hope that you have a great day.